Search code examples
nugettokennuget-packageauthornuspec

NuGet Pack .nuspec file returns "The replacement token 'version' has no value."


This is the error I got while trying to pack a project in Visual Studio 2013:

PM> NuGet Pack C:\ITVizion\RTVizion\ITVizion.RTVizion.Service\ITVizion.RTVizion.Service.nuspec -Prop Configuration=Release
Attempting to build package from 'ITVizion.RTVizion.Service.nuspec'.
NuGet : The replacement token 'version' has no value.
At line:1 char:1
+ NuGet Pack C:\ITVizion\RTVizion\ITVizion.RTVizion.Service\ITVizion.RTVizion.Serv ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (The replacement...' has no value.:String) [], RemoteException
    + FullyQualifiedErrorId : NativeCommandError

What's wrong with this?


Solution

  • I found the problem:

    enter image description here

    Make sure you fill your project Assembly Information page.

    You can access it right clicking your project in Visual Studio Solution Explorer. Select Application tab => Assembly Information... button.