GUI方式
通过GUI的方式,可以下载如下的软件
打包dll
1.打开软件,在Package Content处点击右键 ,选择Add Lib
![](https://i-blog.csdnimg.cn/blog_migrate/fae2f8355ee8483101cb07453d7d1b74.png)
2.在lib处,点击添加Add .NET folder
![](https://i-blog.csdnimg.cn/blog_migrate/e0cf81b6d747f98a17d5638282fe6f2f.png)
3.向文件夹中添加dll文件
![](https://i-blog.csdnimg.cn/blog_migrate/54180438dc4ae28bdaa8058fb5343424.png)
在file菜单处选择Edit Metadata,对package的描述文件进行编辑
<?xml version="1.0" encoding="utf-8"?> <package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd"> <metadata> <id>StoShared.NHibernate</id> <version>1.1.0.357</version> <title>STO Shared nHibernate Library</title> <authors>Microsoft Corporation</authors> <owners>Microsoft Corporation</owners> <requireLicenseAcceptance>false</requireLicenseAcceptance> <description>nHibernate libraries shared across Server and Tools Online</description> <copyright>Copyright (c) Microsoft Corporation 2013</copyright> <dependencies> <dependency id="log4net" version="2.0.0" /> <dependency id="NHibernate" version="3.3.1.4000" /> <dependency id="structuremap" version="2.6.4.1" /> </dependencies> </metadata> </package>
编辑完成后,在菜单选择file-save as进行保存即可。
![](https://i-blog.csdnimg.cn/blog_migrate/99fda03777631fd7fad7f4a35f15c134.png)
使用的时候,把package放在nuget服务器上,并在Nuget.config中设置源即可
<configuration> <activePackageSource> <add key="Framework" value="\\epxsource\builds\Nuget\MSDN.Framework" /> <add key="Package source" value="\\epxsource\Builds\Nuget" /> <add key="nuget.org" value="https://www.nuget.org/api/v2/" /> </activePackageSource> <config> <add key="repositoryPath" value="..\packages" /> </config> <solution> <add key="disableSourceControlIntegration" value="true" /> </solution> <packageSources> <add key="Framework" value="\\epxsource\builds\Nuget\MSDN.Framework" /> <add key="Package source" value="\\epxsource\Builds\Nuget" /> <add key="nuget.org" value="https://www.nuget.org/api/v2/" /> </packageSources> </configuration>
![](https://i-blog.csdnimg.cn/blog_migrate/c456f3d2bff619ab615f4dda6e3b56b7.png)
最新博客地址:http://blog.turenlong.com/