简体   繁体   English

打包Nuget包时如何替换Nuspec文件中的令牌?

[英]How do I replace tokens in Nuspec file when packaging a Nuget package?

I am trying to build the Xamarin.Forms nuget package. 我正在尝试构建Xamarin.Forms nuget包。 This is a PCL library. 这是一个PCL库。

I have the following command: 我有以下命令:

..\..\..\Nuget\Nuget.exe pack ..\.\.nuspec\Xamarin.Forms.nuspec -build

But I get the error: 但是我得到了错误:

The replacement token 'IdAppend' has no value 替换令牌“ IdAppend”没有值

How do I replace the tokens in the Nuspec file when packaging? 打包时如何替换Nuspec文件中的令牌?

I ended up just manually substituting in the values using Find and Replace in Word. 我最终只是使用Word中的“ 查找和替换”来手动替换值。

Seemed the easiest option 似乎是最简单的选择

您可以为此使用-Properties参数

nuget.exe pack ... -Properties idAppend=whaterver;SomeOtherProperty=bla,bla,bla

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM