JSON Configuration Variables Could Not Find File

I am trying to use the JSON Configuration Variables feature with the following path:

approot\packages\#{Octopus.Action.Package.NuGetPackageId}\#{Octopus.Action.Package.NuGetPackageVersion}\root\appSettings.json

#{Octopus.Action.Package.NuGetPackageVersion} resolves to 1.0.0.0024. However, my NuGet package has an actual version of 1.0.0-build0024, so I get the error:

System.IO.DirectoryNotFoundException: Could not find a part of the path ‘C:\Octopus\Applications\Test - Kenya\Bridge.Academies.Api\1.0.0.0024_6\approot\packages\Bridge.Academies.Api\1.0.0.0024\root’.

How can I get this to work?

Hi Rehansaeed,

Thanks for getting in touch. Octopus (and NuGet) use the version string contained in the nuspec file inside the package, not the version from the filename itself. Could you please check what version is specified there? Also check what your feed is reporting the version as. If you are using the internal Octopus feed, you can find that by going to the library menu item.

Please let me know if that is not the problem, hope that helps.

Robert W