The replacement token 'description' has no value——a little cute error about NuGet
At first ,let me introduce the most powerful tool for developers,NuGet!
What is NuGet?
NuGet is the package manager for the Microsoft development platform including .NET. The NuGet client tools provide the ability to produce and consume packages. The NuGet Gallery is the central package repository used by all package authors and consumers.
common command for NuGet .
1、NuGet setApiKey xxxxx-xxxx-xxx-xxxx-xxxx-xxxx (for:setAPIKey of your NuGet count)
2、NuGet spec (for: create a xxxx.nuspec file)
3、NuGet pack xxxxxx.csproj (for: create a xxxx.nupkg file)
4、NuGet push xxxxx.nupkg (for: push the nupkg on your NuGetServer ,then your can published your package,and download them from the nuget store)
today ,i catched the error which is show the message "The replacement token 'description' has no value ". what could trigger thisissue ? wowo, that's so so sinple. you just need know the relationship between the xxx.nuspec file and the xxxx.csproj file.
The $description$ value is replaced by AssemblyDescription's value in AssemblyInfo.cs.The project needs to be built before creating the package however.
How should we know this totally? en hen, OK,let' meet the hole nuspec file <?xml version="1.0"?>
<package >
<metadata>
<id>$id$</id>
<version>$version$</version>
<title>$title$</title>
<authors>$author$</authors>
<owners>$author$</owners>
<licenseUrl>http://LICENSE_URL_HERE_OR_DELETE_THIS_LINE</licenseUrl>
<projectUrl>http://PROJECT_URL_HERE_OR_DELETE_THIS_LINE</projectUrl>
<iconUrl>http://ICON_URL_HERE_OR_DELETE_THIS_LINE</iconUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>$description$</description>
<releaseNotes>Summary of changes made in this release of the package.</releaseNotes>
<copyright>Copyright 2016</copyright>
<tags>Tag1 Tag2</tags>
</metadata>
</package>
here ,those variables gonna replaced by values which came from your Properties\AssemblyInfo.cs file, it 's decide by the config in your
Properties\AssemblyInfo.cs file. Let's watch the entire file
so, did you noticed the flag? that's the reason why we'll met the error "The replacement token 'description' has no value"here .
How to solve this problem?
that's easy ! just fill in the blank in your Properties\AssemblyInfo.cs file , and then thexxx.nuspec file can get the value which come from yourProperties\AssemblyInfo.cs file.
Note : there is no need to moddify thexxxx.nuspec file. Just let it run automaticly . To be a lazy man haha!
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
다양한 언어의 JSON
JSON은 Javascript 표기법을 사용하여 데이터 구조를 레이아웃하는 데이터 형식입니다.
그러나 Javascript가 코드에서 이러한 구조를 나타낼 수 있는 유일한 언어는 아닙니다.
저는 일반적으로 '객체'{}...
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.
NuGet is the package manager for the Microsoft development platform including .NET. The NuGet client tools provide the ability to produce and consume packages. The NuGet Gallery is the central package repository used by all package authors and consumers.
common command for NuGet .
1、NuGet setApiKey xxxxx-xxxx-xxx-xxxx-xxxx-xxxx (for:setAPIKey of your NuGet count)
2、NuGet spec (for: create a xxxx.nuspec file)
3、NuGet pack xxxxxx.csproj (for: create a xxxx.nupkg file)
4、NuGet push xxxxx.nupkg (for: push the nupkg on your NuGetServer ,then your can published your package,and download them from the nuget store)
today ,i catched the error which is show the message "The replacement token 'description' has no value ". what could trigger thisissue ? wowo, that's so so sinple. you just need know the relationship between the xxx.nuspec file and the xxxx.csproj file.
The $description$ value is replaced by AssemblyDescription's value in AssemblyInfo.cs.The project needs to be built before creating the package however.
How should we know this totally? en hen, OK,let' meet the hole nuspec file
<?xml version="1.0"?>
<package >
<metadata>
<id>$id$</id>
<version>$version$</version>
<title>$title$</title>
<authors>$author$</authors>
<owners>$author$</owners>
<licenseUrl>http://LICENSE_URL_HERE_OR_DELETE_THIS_LINE</licenseUrl>
<projectUrl>http://PROJECT_URL_HERE_OR_DELETE_THIS_LINE</projectUrl>
<iconUrl>http://ICON_URL_HERE_OR_DELETE_THIS_LINE</iconUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>$description$</description>
<releaseNotes>Summary of changes made in this release of the package.</releaseNotes>
<copyright>Copyright 2016</copyright>
<tags>Tag1 Tag2</tags>
</metadata>
</package>
here ,those variables gonna replaced by values which came from your Properties\AssemblyInfo.cs file, it 's decide by the config in your
Properties\AssemblyInfo.cs file. Let's watch the entire file
so, did you noticed the flag? that's the reason why we'll met the error "The replacement token 'description' has no value"here .
How to solve this problem?
that's easy ! just fill in the blank in your Properties\AssemblyInfo.cs file , and then thexxx.nuspec file can get the value which come from yourProperties\AssemblyInfo.cs file.
Note : there is no need to moddify thexxxx.nuspec file. Just let it run automaticly . To be a lazy man haha!
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
다양한 언어의 JSONJSON은 Javascript 표기법을 사용하여 데이터 구조를 레이아웃하는 데이터 형식입니다. 그러나 Javascript가 코드에서 이러한 구조를 나타낼 수 있는 유일한 언어는 아닙니다. 저는 일반적으로 '객체'{}...
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.