Hi,
I’m trying to build a .nuget using TeamCity and OctoPack and a .nuspec with a variable, but I’m getting an error:
[CreateOctoPackPackage] error OCTONUGET: The replacement token ‘Configuration’ has no value.
[16:39:31][CreateOctoPackPackage] error OCT-1676060969: There was an error calling NuGet. Please see the output above for more details.
Command line: ‘C:…\packages\OctoPack.3.0.45\tools\NuGet.exe’ pack “C:…\TaskProcessor.Deployment\obj\octopacking\TaskProcessor.Deployment.nuspec” -NoPackageAnalysis -BasePath “C:…\TaskProcessor.Deployment” -OutputDirectory “C:…\TaskProcessor.Deployment\obj\octopacked” -Version 1.0.3.1944
[16:39:31]
[CreateOctoPackPackage] error OCT-1676060969: System.Exception: There was an error calling NuGet. Please see the output above for more details.
Command line: ‘C:…\packages\OctoPack.3.0.45\tools\NuGet.exe’ pack “C:…\TaskProcessor.Deployment\obj\octopacking\TaskProcessor.Deployment.nuspec” -NoPackageAnalysis -BasePath “C:…\TaskProcessor.Deployment” -OutputDirectory “C:…\TaskProcessor.Deployment\obj\octopacked” -Version 1.0.3.1944
at OctoPack.Tasks.CreateOctoPackPackage.RunNuGet(String specFilePath, String octopacking, String octopacked, String projectDirectory) in y:\work\1f6ae101e1fcba62\source\OctoPack.Tasks\CreateOctoPackPackage.cs:line 551
at OctoPack.Tasks.CreateOctoPackPackage.Execute() in y:\work\1f6ae101e1fcba62\source\OctoPack.Tasks\CreateOctoPackPackage.cs:line 188
In the build step, the command line parameter is:
/p:OctoPackNuGetProperties=Configuration=%system.Configuration%
where %system.Configuration% is defined and equals “Release”
And the .nuspec looks like this:
When I’m running the build from command line with: msbuild /t:Rebuild /p:Configuration=Release /p:RunOctoPack=true /p:OctoPackNuGetProperties="Configuration=Release"
it works just fine
I’m running OD version 3.2.8.
Any ideas why the property is not passed to OctoPack and further to NuGet?