{"id":566,"date":"2017-03-16T18:23:41","date_gmt":"2017-03-16T18:23:41","guid":{"rendered":"http:\/\/db85e2590b6109813dafa101ceb2faeb"},"modified":"2019-04-29T03:24:19","modified_gmt":"2019-04-28T19:24:19","slug":"nuget","status":"publish","type":"post","link":"https:\/\/www.xiaobo.li\/notes\/archives\/566","title":{"rendered":"nuget"},"content":{"rendered":"<p><b><br \/>\n\u4e0b\u8f7d\u5730\u5740\uff1a<\/b><br \/>\n\u547d\u4ee4\u884c\uff1a http:\/\/nuget.codeplex.com\/downloads\/get\/669083<br \/>\n\u547d\u4ee4\u884c\uff1a http:\/\/nuget.org\/downloads<br \/>\n\u56fe\u5f62\u7a97\uff1a https:\/\/github.com\/NuGetPackageExplorer<\/p>\n<p><b>*.nuspec<\/b><\/p>\n<table style=\"width: 95%;\" border=\"1\" cellspacing=\"0\" cellpadding=\"0\">\n<thead>\n<tr>\n<th>Folder<\/th>\n<th>Description<\/th>\n<th>Action upon package install<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>tools<\/td>\n<td>Powershell scripts and programs accessible from the Package Manager Console<\/td>\n<td>Contents are copied to the project folder, and the tools folder is added to the PATH environment variable.<\/td>\n<\/tr>\n<tr>\n<td>lib<\/td>\n<td>Assembly(.dll) files (.dll), documentation (.xml) files, and symbol (.pdb) files<\/td>\n<td>Assemblies are added as references; .xml and .pdb copied into project folders.<\/td>\n<\/tr>\n<tr>\n<td>content<\/td>\n<td>Arbitrary files<\/td>\n<td>Contents are copied to the project root<\/td>\n<\/tr>\n<tr>\n<td>build<\/td>\n<td>MSBuild .targets and .props files<\/td>\n<td>Automatically inserted into the project file (NuGet 2.x) or project.json.lock (NuGet 3.x).<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<pre class=\"pure-highlightjs\"><code class=\"xml\">&lt;?xml version=\"1.0\"?&gt;\n&lt;package xmlns=\"http:\/\/schemas.microsoft.com\/packaging\/2013\/05\/nuspec.xsd\"&gt;\n&lt;metadata&gt;\n&lt;!-- The identifier that must be unique within the hosting gallery --&gt;\n&lt;id&gt;Contoso.Utility.UsefulStuff&lt;\/id&gt;\n&lt;!-- The package version number that is used when resolving dependencies --&gt;\n&lt;version&gt;1.8.3.331&lt;\/version&gt;\n&lt;!-- Authors contain text that appears directly on the gallery --&gt;\n&lt;authors&gt;Dejana Tesic, Rajeev Dey&lt;\/authors&gt;\n&lt;!-- Owners are typically nuget.org identities that allow gallery\nusers to earily find other packages by the same owners.  --&gt;\n&lt;owners&gt;dejanatc, rjdey&lt;\/owners&gt;\n&lt;!-- License and project URLs provide links for the gallery --&gt;\n&lt;licenseUrl&gt;http:\/\/opensource.org\/licenses\/MS-PL&lt;\/licenseUrl&gt;\n&lt;projectUrl&gt;http:\/\/github.com\/contoso\/UsefulStuff&lt;\/projectUrl&gt;\n&lt;!-- The icon is used in Visual Studio's package manager UI --&gt;\n&lt;iconUrl&gt;http:\/\/github.com\/contoso\/UsefulStuff\/nuget_icon.png&lt;\/iconUrl&gt;\n&lt;!-- If true, this value prompts the user to accept the license when\ninstalling the package. --&gt;\n&lt;requireLicenseAcceptance&gt;false&lt;\/requireLicenseAcceptance&gt;\n&lt;!-- Any details about this particular release --&gt;\n&lt;releaseNotes&gt;Bug fixes and performance improvements&lt;\/releaseNotes&gt;\n&lt;!-- The description can be used in package manager UI. Note that the\nnuget.org gallery uses information you add in the portal. --&gt;\n&lt;description&gt;Core utility functions for web applications&lt;\/description&gt;\n&lt;!-- Copyright information --&gt;\n&lt;copyright&gt;Copyright \u00a92016 Contoso Corporation&lt;\/copyright&gt;\n&lt;!-- Tags appear in the gallery and can be used for tag searches --&gt;\n&lt;tags&gt;web utility http json url parsing&lt;\/tags&gt;\n&lt;!-- Dependencies are automatically installed when the package is installed --&gt;\n&lt;dependencies&gt;\n&lt;dependency id=\"Newtonsoft.Json\" version=\"9.0\" \/&gt;\n&lt;\/dependencies&gt;\n&lt;\/metadata&gt;\n&lt;!-- A readme.txt will be displayed when the package is installed --&gt;\n&lt;files&gt;\n&lt;file src=\"readme.txt\" target=\"\" \/&gt;\n&lt;\/files&gt;\n&lt;\/package&gt;<\/code><\/pre>\n<p><b><br \/>\n\u547d\u4ee4\uff1a<\/b><br \/>\nnuget spec<br \/>\nnuget pack ClassLibrary2.csproj -Build -Properties Configuration=Release<br \/>\nnuget push *.nupkg -s http:\/\/127.0.0.1 apikey<\/p>\n<p><b>iis6:<\/b><br \/>\n\u9700\u8981\u6dfb\u52a0\u901a\u914d\u7b26\u7a0b\u5e8f<br \/>\n<a id=\"ematt:520\" href=\"\/notes\/content\/uploadfile\/201703\/f3cc1489720780.jpg\" target=\"_blank\" rel=\"noopener noreferrer\"><img decoding=\"async\" src=\"\/notes\/content\/uploadfile\/201703\/f3cc1489720780.jpg\" alt=\"\u70b9\u51fb\u67e5\u770b\u539f\u56fe\" border=\"0\" \/><\/a><br \/>\n<a id=\"ematt:521\" href=\"\/notes\/content\/uploadfile\/201703\/15601489720780.jpg\" target=\"_blank\" rel=\"noopener noreferrer\"><img decoding=\"async\" src=\"\/notes\/content\/uploadfile\/201703\/15601489720780.jpg\" alt=\"\u70b9\u51fb\u67e5\u770b\u539f\u56fe\" border=\"0\" \/><br \/>\n<\/a>\u6ce8\u610f64bit\/32bit<br \/>\n<a id=\"ematt:522\" href=\"\/notes\/content\/uploadfile\/201703\/799b1489720781.jpg\" target=\"_blank\" rel=\"noopener noreferrer\"><img decoding=\"async\" src=\"\/notes\/content\/uploadfile\/201703\/799b1489720781.jpg\" alt=\"\u70b9\u51fb\u67e5\u770b\u539f\u56fe\" border=\"0\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p><b>\u4e0b\u8f7d\u5730\u5740\uff1a<\/b><br \/>\n\u547d\u4ee4\u884c\uff1a http:\/\/nuget.codeplex.com\/downloads\/get\/669083<br \/>\n\u547d\u4ee4\u884c\uff1a http:\/\/nuget.org\/downloads<br \/>\n\u56fe\u5f62\u7a97\uff1a https:\/\/github.com\/NuGetPackageExplorer <a href=\"https:\/\/www.xiaobo.li\/notes\/archives\/566\">\u7ee7\u7eed\u9605\u8bfb <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[279],"tags":[],"class_list":["post-566","post","type-post","status-publish","format-standard","hentry","category-dotnet"],"_links":{"self":[{"href":"https:\/\/www.xiaobo.li\/notes\/wp-json\/wp\/v2\/posts\/566","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.xiaobo.li\/notes\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.xiaobo.li\/notes\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.xiaobo.li\/notes\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.xiaobo.li\/notes\/wp-json\/wp\/v2\/comments?post=566"}],"version-history":[{"count":0,"href":"https:\/\/www.xiaobo.li\/notes\/wp-json\/wp\/v2\/posts\/566\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.xiaobo.li\/notes\/wp-json\/wp\/v2\/media?parent=566"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.xiaobo.li\/notes\/wp-json\/wp\/v2\/categories?post=566"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.xiaobo.li\/notes\/wp-json\/wp\/v2\/tags?post=566"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}