Deploying Package error (System.NotSupportedException: The given path's format is not supported.)

For backround context, this process was working fine, on our old Bamboo server. It has stopped working since we have moved our builds to a new Bamboo server, which is also using a newer version of Visual Studio.

I have seemed to get past all the other build changes, but when it sends the package to Octopus Deploy for Auto-Deployment (Or manual) I get the following error on the step Run a Script.

Deploying package: C:\Octopus\Files\TCR.sln@S1.0.890@B5EC80D41CDAF94CB071C2C169C12D28.nupkg

September 26th 2023 21:11:31

Error

System.NotSupportedException: The given path’s format is not supported.

September 26th 2023 21:11:31

Error

at System.Security.Permissions.FileIOPermission.EmulateFileIOPermissionChecks(String fullPath)

September 26th 2023 21:11:31

Error

at System.IO.Directory.InternalCreateDirectoryHelper(String path, Boolean checkHost)

September 26th 2023 21:11:31

Error

at Calamari.Common.Features.Packages.NuGet.NupkgExtractor.Extract(String packageFile, String directory)

September 26th 2023 21:11:31

Error

at Calamari.Common.Features.Packages.ExtractPackage.Extract(PathToPackage pathToPackage, String targetPath, IPackageExtractor customPackageExtractor)

September 26th 2023 21:11:31

Error

at Calamari.Deployment.ConventionProcessor.RunInstallConventions()

September 26th 2023 21:11:31

Error

at Calamari.Deployment.ConventionProcessor.RunConventions()

September 26th 2023 21:11:31

Error

Running rollback conventions…

September 26th 2023 21:11:31

Error

The given path’s format is not supported.

September 26th 2023 21:11:31

Error

System.NotSupportedException

September 26th 2023 21:11:31

Error

at System.Security.Permissions.FileIOPermission.EmulateFileIOPermissionChecks(String fullPath)

September 26th 2023 21:11:31

Error

at System.IO.Directory.InternalCreateDirectoryHelper(String path, Boolean checkHost)

September 26th 2023 21:11:31

Error

at Calamari.Common.Features.Packages.NuGet.NupkgExtractor.Extract(String packageFile, String directory)

September 26th 2023 21:11:31

Error

at Calamari.Common.Features.Packages.ExtractPackage.Extract(PathToPackage pathToPackage, String targetPath, IPackageExtractor customPackageExtractor)

September 26th 2023 21:11:31

Error

at Calamari.Deployment.ConventionProcessor.RunInstallConventions()

September 26th 2023 21:11:31

Error

at Calamari.Deployment.ConventionProcessor.RunConventions()

September 26th 2023 21:11:31

Error

at Calamari.Commands.DeployPackageCommand.Execute(String commandLineArguments)

September 26th 2023 21:11:31

Error

at Calamari.Common.CalamariFlavourProgram.Run(String args)

September 26th 2023 21:11:32

Fatal

The remote script failed with exit code 100

September 26th 2023 21:11:32

Fatal

The action Deploy Internal DB TCR_Dev And Test NuGet to Tentacle on devsqlappn01 failed

Good morning @A-Sedler,

Thank you for contacting Octopus Support and sorry to hear you are seeing errors when deploying a package.

Thank you for sending the log over, I can see that package name you have is:

C:\Octopus\Files\TCR.sln@S1.0.890@B5EC80D41CDAF94CB071C2C169C12D28.nupkg

Which seems to align fine with one of my packages that I can successfully deploy via Octopus using a Deploy a Package step:

RandomQuotesArtifactoryNuget@S1.0.4@C1C3AD7553DE834CB4EB9A872CB5725B.nupkg

I then changed my Nuget file so its the same format as yours and that also deploys fine:

C:\Octopus\Files\TCR.sln@S1.0.890@7798DEB51608EF4C84D22FE89AB627A0.nupkg

So its either your package itself (the way its been built in bamboo) or its the way Bamboo has uploaded it to Octopus and when its uploaded it its corrupted the package.

You mentioned when you run the deploy manually it does not work, do you mean if you run it via the Octopus UI?

Would you be able to try this so instead of going through Bamboo would you be able to try deploying a Nuget package (the same one if you can first and then a different one) to a test server perhaps, if you can setup a test project with a ‘Deploy a Package’ step and try to deploy that package via the Octopus UI does that work?

I have found a few articles for Nuget that mentions The given path’s format is not supported which also mention Visual Studio but none of them seem to be consistent and I do not know your setup so it would be worth setting up a Deploy a Package project and deploy that package so it rules out Octopus not wanting to deploy that package and you can focus on Bamboo and Visual Stuido then.

For reference here are the articles I found:

Hopefully that helps, let me know if you can deploy the package through Octopus using a Deploy a Package Step.

Kind Regards,
Clare

You asked " *You mentioned when you run the deploy manually it does not work, do you mean if you run it via the Octopus UI?" That is Correct, If I just send the package to Octopus, then go into Octopus Deploy and run it manually it fails just the same as the automatic push coming from Bamboo.

We have other projects that go through Bamboo and are deploying packages to Octopus just fine using Octo.exe.

The Big Difference I want to highlight is that This process was working fine on our Older Remote Build Agent.

There are some key differences though.
Both Command line from Bamboo
We were using Devenv.exe from a VS 2015 version, We are now attempting to use Devenv.exe from the VS 2022 Community edition.
This build seems to work fine and it does complete the step without any issues.

The Push Step gave me issues at first and said I needed to use the -SkipDuplicate parameter which I added at the end of the nuget.exe push command.

I do not think I have a test server that it would work on. This is the Dev Environment I am trying to push to currently.

Hey @A-Sedler,

Thank you for the extra information there that does help.

Unfortunately this does look like an issue with the package you have built not Octopus. If you say your bamboo server is able to build other NuGet packages and deploy them fine and I have tested the name of my NuGet package which deploys fine through Octopus the only thing that could be the issue is the files you have within the NuGet Package that is being pushed to Octopus.

Just to be sure, my colleague has a bamboo setup (Bamboo version 8.1.4 build 8011) and we forked one of our Octopus website projects from our GitHub repo and built that into a Bamboo package using this guide and the same package name as yours and it pushed the package to Octopus fine in Bamboo and then we used it in a Deploy A Package step and it worked fine (below is the Octopus task log for that deployment with some lines removed so it only shows the main deploy package lines):

10:58:39   Info     |       Deploying package:    /etc/octopus/LaptopPolling/Files/TCR.SLN@S1.0.890@5CEBFE43DB928D4CA5B707E9FA6D2887.nupkg
10:58:42   Verbose  |       Extracting package to: /home/Octopus/Applications/Dev/TCR.SLN/1.0.890
10:58:42   Verbose  |       Timed operation 'Extract package' started.
10:58:42   Verbose  |       Timed operation 'Extract package' completed in 407ms.
10:58:42   Verbose  |       Extracted 54 files
10:58:42   Verbose  |       The package has been installed to: /home/Octopus/Applications/Dev/TCR.SLN/1.0.890
10:58:42   Verbose  |       Successfully finished Deploy a Package on LinuxLaptopPolling

Since you did say some packages were successfully deployed after a Bamboo push using your new Bamboo server but this one is not, and I have now ruled out the package name from a manual upload to my Octopus server, and we have now ruled out the package being made in Bamboo itself and pushed / deployed successfully by Octopus the only thing this could be is the VS code you are using for that package which unfortunately we are unable to help with as its not our area of expertise.

We are also unable to test building a package using different VS versions as we have proven Octopus will push a NuGet package with the same name as the one you are using.

I am sorry we could not help you further here, it might be worth trying to post your error up in a VS forum and see if anyone has come across the same thing as the error you are seeing is not one coming from Octopus itself.

Hopefully you find what the issue is and can start to deploy that package, if you do come across what the issue is and you have some time to post it up here it would really help other users if they experience the same issue you have.

Kind Regards,
Clare

Thank you Clare. I appreciate you and your team taking a look at my issue. I will work with our Developer and take a look at the code he is trying to push out.

1 Like

Hey @A-Sedler,

No worries at all I really do hope you get this sorted and I am sorry we could not be of more help here.

Reach out if you have any other issues via our email at support@octopus.com and we will always do our best to help.

Kind Regards,
Clare

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.