标签:
nuget spec MyAssembly.dll
<?xml version="1.0"?> <package > <metadata> <id>StoShared.NHibernate.dll</id> <version>1.0.0</version> <authors>rentu</authors> <owners>rentu</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>Package description</description> <releaseNotes>Summary of changes made in this release of the package.</releaseNotes> <copyright>Copyright 2016</copyright> <tags>Tag1 Tag2</tags> <dependencies> <dependency id="SampleDependency" version="1.0" /> </dependencies> </metadata> </package>
nuget pack MyAssembly.nuspec
nuget spec
<?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>
Token | Source |
$id$ | The Assembly name |
$version$ | The assembly version as specified in the assembly’sAssemblyVersionAttribute (orAssemblyInformationalVersionAttribute if present). |
$author$ | The company as specified in the AssemblyCompanyAttribute. |
$description$ | The description as specified in the AssemblyDescriptionAttribute. |
<files> <filesrc="..\..\SomeRoot\**\*.*" target=""/> </files>
nuget pack MyProject.csproj
nuget pack A.csproj -IncludeReferencedProjects 打包时包含引用的项目nuget pack MyProject.csproj -Prop Configuration=Release 打包release的dll
【ASP.NET】利用Nuget打包package——命令行方式
标签:
原文地址:http://www.cnblogs.com/reachteam/p/5768676.html