Nov 5, 2012
4 mins read
<?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 2012</copyright>
<tags>Tag1 Tag2</tags>
</metadata>
</package>
除了這幾個用來設定套件資訊的項目之外,還可以在這個檔案中包含相依性 例如要在這個套件中,使用到log4net套件,那只要加一行dependencies資料就行了
<dependencies>
<dependency id=”log4net” version=”2.0.0” />
</dependencies>
除了相依性,還可以指定GAC裡面的Assembly,例如System.ServiceModel
<frameworkAssemblies>
<frameworkAssembly assemblyName=”System.ServiceModel” targetFramework=”net40” />
</frameworkAssemblies>
如果要額外打包檔案的話,就要用files這個tag了 src指定檔案所在的相對路徑,target指定檔案在套件中的位置 也可以萬用字元和exclude來排除特定檔案
<files>
<file src=”bin\Debug*.dll” target=”lib” />
<file src=”bin\Debug*.pdb” target=”lib” />
<file src=”tools*\.“ exclude=”**\.log” />
</files>
Sharing is caring!