Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

The replacement token 'description' has no value

Tags:

c#

.net

nuget

Trying to create and publish a NuGet package from a project (*.csproj) via NuGet.exe and I got the following warning:

The replacement token 'description' has no value.

How can I get rid of this warning?

like image 220
Rubens Mariuzzo Avatar asked Feb 20 '13 14:02

Rubens Mariuzzo


4 Answers

This warning appear when the Visual Studio project was not built before packaging using NuGet. Just rebuild your project and repack.

  1. Go to Build then Rebuild.
  2. From command prompt: nuget pack your-project.csproj.

Then it should work.

Note this behavior was filed as an issue in CodePlex.

Note: as per Boris Callens' response below, can use the -Build to have NuGet do the build

like image 149
Rubens Mariuzzo Avatar answered Nov 16 '22 01:11

Rubens Mariuzzo


Ensure you defined the assembly description in your Properties\AssemblyInfo.cs file for the project you are targeting when calling nuget.exe pack *.csproj.

[assembly: AssemblyDescription("Here goes the NuSpec $description$ token.")]

Also check the NuGet docs on tokenized NuGet manifests for more info: http://docs.nuget.org/docs/reference/nuspec-reference#Replacement_Tokens

like image 23
Xavier Decoster Avatar answered Nov 16 '22 00:11

Xavier Decoster


The $description$ value is replaced by AssemblyDescription's value in AssemblyInfo.cs. The project needs to be built before creating the package however. To have nuget do this for you you can use the -build flag

path:\to\project\nuget.exe [project.csproj] -build
like image 5
Boris Callens Avatar answered Nov 15 '22 23:11

Boris Callens


I have similar problem on "The replacement token 'author' has no value". I use nuget pack projectfilename.csproj -Build and problem is solved, hope it helps

like image 5
learningBunny Avatar answered Nov 16 '22 01:11

learningBunny