\u672c\u6587\u4ecb\u7ecd\u7684\u662f\u5728\u4f7f\u7528nuget\u6253\u5305\u7684\u8fc7\u7a0b\u4e2d\u9047\u5230\u4e22\u5931\u6587\u4ef6\u7684\u95ee\u9898\u7684\u65f6\u5019\u4f7f\u7528powershell\u811a\u672c\u5b9e\u73b0\u7684\u89e3\u51b3\u529e\u6cd5\uff0c\u975e\u5e38\u7684\u5de7\u5999<\/strong><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n\u5bf9\u4e8e\u8fdb\u884cnuget\u6253\u5305\u65f6\uff0c\u6709\u65f6\u6211\u4eec\u9700\u8981\u6dfb\u52a0\u4e00\u4e2a\u914d\u7f6e\u6587\u4ef6\uff0c\u5c31\u662f\u4e00\u4e9b\u6587\u672c\u6587\u4ef6\uff0c\u800c\u8fd9\u4e9b\u6587\u4ef6\u6211\u4eec\u5728\u7f51\u7ad9\u53d1\u5e03\u65f6\u9700\u8981\u540c\u65f6\u590d\u5236\u5230\u8f93\u51fa\u76ee\u5f55\uff0c\u5426\u5219\u4f1a\u51fa\u73b0\u6587\u4ef6\u4e22\u5931\u7684\u95ee\u9898\uff0c\u6211\u4eec\u5728\u6253\u5305\u65f6\u901a\u8fc7\u6dfb\u52a0powershell\u811a\u672c\u6765\u89e3\u51b3\u5b83\u3002<\/p>\n
\u4e00\u822c\u6dfb\u52a0powershell\u5305\u4e4b\u540e\uff0c\u5305\u7684\u683c\u5f0f\u5982\u4e0b
\n<\/p>\n
\u6dfb\u52a0\uff0d\u3009\u5de5\u5177\uff0d\u3009install.ps1\u811a\u672c<\/p>\n
\r\nparam($installPath, $toolsPath, $package, $project)\r\n$configItem = $project.ProjectItems.Item(\"log4.config\")\r\n \r\n# set 'Copy To Output Directory' to 'Copy if newer'\r\n$copyToOutput = $configItem.Properties.Item(\"CopyToOutputDirectory\")\r\n$copyToOutput.Value = 1\r\n \r\n# set 'Build Action' to 'Content'\r\n$buildAction = $configItem.Properties.Item(\"BuildAction\")\r\n$buildAction.Value = 2\r\n<\/pre>\n\u5f53\u6211\u4eec\u5728\u9879\u76ee\u91cc\u6dfb\u52a0nuget\u5305\u65f6\uff0c\u67e5\u770b\u8f93\u51fa\u7a97\u53e3\uff0c\u53ef\u4ee5\u770b\u5230\u6211\u4eec\u7684ps1\u811a\u672c\u88ab\u81ea\u52a8\u6267\u884c\u4e86\uff0c\u5b83\u4fee\u6539\u4e86log4.config\u7684\u6587\u4ef6\u5c5e\u6027\uff0c\u5b83\u8ba9\u5177\u6709\u201c\u59cb\u7ec8\u590d\u5236\u201d\u5230\u8f93\u51fa\u76ee\u5f55\u7684\u5c5e\u6027\uff01
\n<\/p>\n
\u73b0\u5728\u6211\u4eec\u5728\u5efa\u7acbnuget\u5305\u65f6\uff0c\u5982\u679c\u5e0c\u671b\u8fdb\u884c\u4e00\u4e9b\u521d\u59cb\u5316\u7684\u529f\u80fd\uff0c\u5c31\u53ef\u4ee5\u4f7f\u7528\u8fd9\u79cd\u65b9\u5f0f\u4e86\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"
\u5bf9\u4e8e\u8fdb\u884cnuget\u6253\u5305\u65f6\uff0c\u6709\u65f6\u6211\u4eec\u9700\u8981\u6dfb\u52a0\u4e00\u4e2a\u914d\u7f6e\u6587\u4ef6\uff0c\u5c31\u662f\u4e00\u4e9b\u6587\u672c\u6587\u4ef6\uff0c\u800c\u8fd9\u4e9b\u6587\u4ef6\u6211\u4eec\u5728\u7f51\u7ad9\u53d1\u5e03\u65f6\u9700\u8981\u540c\u65f6\u590d […]<\/p>\n","protected":false},"author":1479,"featured_media":14230,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[55],"tags":[],"class_list":["post-217326","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-thread"],"acf":[],"_links":{"self":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/217326","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/users\/1479"}],"replies":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/comments?post=217326"}],"version-history":[{"count":2,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/217326\/revisions"}],"predecessor-version":[{"id":217330,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/217326\/revisions\/217330"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media\/14230"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=217326"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=217326"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=217326"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}