OctoPack error about replacement token

I get the following error when trying to OctoPack. The error only occurs on my web project, and a variety of service projects seem to pack okay.

error OCTONUGET: The replacement token 'id' has no value.
error OCT-1676060969: There was an error calling NuGet.Please see the output above for more details. Command line: 'C:\BuildAgent\work\20124c334378baa0\Core\packages\OctoPack.3.0.31\tools\NuGet.exe' pack "C:\BuildAgent\work\20124c334378baa0\Core\src\Web\obj\octopacking\Web.nuspec"  -NoPackageAnalysis -BasePath "C:\BuildAgent\work\20124c334378baa0\Core\src\Web" -OutputDirectory "C:\BuildAgent\work\20124c334378baa0\Core\src\Web\obj\octopacked" -Version 1.0.0.0 
error OCT-1676060969: System.Exception: There was an error calling NuGet. Please see the output above for more details. Command line: 'C:\BuildAgent\work\20124c334378baa0\Core\packages\OctoPack.3.0.31\tools\NuGet.exe' pack "C:\BuildAgent\work\20124c334378baa0\Core\src\Web\obj\octopacking\Web.nuspec"  -NoPackageAnalysis -BasePath "C:\BuildAgent\work\20124c334378baa0\Core\src\Web" -OutputDirectory "C:\BuildAgent\work\20124c334378baa0\Core\src\Web\obj\octopacked" -Version 1.0.0.0
   at OctoPack.Tasks.CreateOctoPackPackage.RunNuGet(String specFilePath, String octopacking, String octopacked, String projectDirectory) in y:\work\46cfb6001f03d701\source\OctoPack.Tasks\CreateOctoPackPackage.cs:line 520
   at OctoPack.Tasks.CreateOctoPackPackage.Execute() in y:\work\46cfb6001f03d701\source\OctoPack.Tasks\CreateOctoPackPackage.cs:line 181 

The projects that work seem to have nuspecs generated with actual names whereas my web project ends up with $id$. I don’t know why that’s what is generated.

Hi David,

Thanks for getting in touch! Are you able to provide the full build log, as shown in the errors you provided: "Please see the output above for more details."
This might help us get pointed in the right direction here.

Thanks!
Vanessa

Sure, I’ve attached it.

FunnelFire_Feature_Branches_2050.log (1 MB)

Just checking to see if any progress has been made. I’m very interested in using Octopus but this is blocking me.

Do you guys have paid support? I’m nervous that we’ll start using your product and have an issue that blocks us, and then be left dead for 2 days.

Hi David

Sorry for the delay in getting back to you. Also apologies if you get duplicate answers, my first reply got eaten.

Anyway, are you able to send me your build configuration / msbuild script. I’d like to understand a little more about your build process and how octopack is getting called.

You have my email address if it’s sensitive data.

Regards

Damian

I’ve attached two csproj files that our TeamCity build server builds for us. The BatchWorker one packs correctly (as does 3 other similar Windows Service packages), but the Web one is the one that gets the error above.

Web.csproj (85 KB)

BatchWorker.csproj (23 KB)

Thanks David

Where are you invoking your Nuget packaging from ?
I don’t see any OctoPack references in those csproj files, are you able to describe your build process further ?

Regards

Damian

Oops, I was on a different (non-Octopus) branch! :slight_smile:

Let’s try this again…

Web.csproj (87 KB)

BatchWorker.csproj (24 KB)

Hi David

Just checking.
Do you already have a hand rolled nuspec file for the web project ? or is OctoPack creating it for you ?

Regards

Damian

OctoPack is creating it.

This one has me a little stumped so far, I’ve not seen this before.

Can you have a look at the nuspec file that’s generated ? It should be at C:\BuildAgent\work\20124c334378baa0\Core\src\Web\obj\octopacking\Web.nuspec based on your logs. I’d like to see if the ID is actually empty, in which case we may have a bug in octopack, but not one I’ve seen before.

Thanks

Damian

Its actually set to $id$

OK now that’s really odd, because OctoPack wouldn’t write that if it generated the nuspec file.

In your teamcity build config, are you doing a clean before a build ?

Damian

No. I can try that though, one moment.

How did you go ?

Build failed with no change. I’ve attached the nuspec from the octopacking
subfolder under obj.

Web.nuspec (514 Bytes)

Was the nuspec helpful?

Hi David

Well it’s a clue anyway.
That nuspec doesn’t look one generated by OctoPack. A generated Nuspec wouldn’t have a lot of those details filled in, it would have an autogenerated description tag with a datestamp and it would be explicit about every file in the package.

So, there is something else in your build process that is or has generated that file / or it’s in your source control. Octopack is seeing the file and not generating a new one, but because it hasn’t had the parameters replaced Nuget.exe is failing to build the package.

Without seeing your full source and build I can’t tell you exactly where to look, but does that give you some clues to look at ?

Thanks

Damian

Unfortunately not.

We have no nuspec files, and until the OctoPack stage, the nuspec files
does not exist.

I’m happy to set up a screen share session if you think it would be helpful
to look at my environment.

I eliminated TeamCity from the equation by doing msbuild locally on my dev
box, and it still happens.