这是我用来创建NuGet包的命令行:
nuget.exe pack something.csproj -OutputDirectory "\\some\directory" -Prop Configuration=Release
有没有办法直接在命令行中设置projectUrl
元素(或者任何其他Metadata element)?
答案 0 :(得分:0)
如下所示:
nuget pack something.csproj foo.nuspec /p version=1.0.0.0;projectUrl="http://myurl.com/
while nuspec would look like the following:
<?xml version='1.0'?>
<package xmlns='http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd'>
<metadata>
<id>Foo</d>
<version>$version$</version>
<authors>$authors$</authors>
<description>Some description</description>
<language>en-US</language>
<licenseUrl>$licenseUrl$</licenseUrl>
<projectUrl>$projectUrl$</projectUrl>
<iconUrl>$iconUrl$</iconUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<tags>some tags</tags>
<dependencies>
<dependency id='CodeContracts.Unofficial' version='$codeContractsVersion$'/>
</dependencies>
</metadata>
<files>
......
</files>
</package>