{"id":1999,"date":"2021-09-17T00:44:57","date_gmt":"2021-09-16T16:44:57","guid":{"rendered":"https:\/\/www.develop-note.com\/blog\/?p=1999"},"modified":"2021-10-14T18:54:42","modified_gmt":"2021-10-14T10:54:42","slug":"dotnet-cli","status":"publish","type":"post","link":"https:\/\/www.develop-note.com\/blog\/2021\/09\/17\/dotnet-cli\/","title":{"rendered":"D-28-dotnet cli ? build ? run"},"content":{"rendered":"<h1>\u7522\u751f\u4e86\u5c08\u6848\u4e4b\u5f8c<\/h1>\n<p>\u6628\u5929\u7d93\u7531\u5927\u982d\u7684\u4ee3\u9818\u5c0f\u5149\u7d42\u65bc\u5b8c\u6210\u5efa\u7f6e\u74b0\u5883\uff0c\u4e26\u4e14\u4e5f\u7522\u751f\u4e86\u4ed6\u4eba\u751f\u4e2d\u7b2c\u4e00\u500b\u5c08\u6848\uff0c\u96d6\u7136\u6700\u5f8c\u5728Hello World\u4e2d\u7d50\u675f\u4e86\u4ed6\u7b2c\u4e00\u500b\u5c08\u6848\u3002\u4e0d\u904e\u4eca\u5929\u5c0f\u5149\u6703\u9047\u5230\u4ec0\u9ebc\u4e8b\u5462\uff1f<\/p>\n<p><!--more--><\/p>\n<h2>dotnet cli<\/h2>\n<p>\u300c\u524d\u8f29\u6211\u4f86\u4e86\uff0c\u6211\u53ef\u4ee5\u958b\u59cb\u958b\u767c\u4e86\u55ce\uff1f\u300d<br \/>\n\u4e00\u65e9\u5230\u516c\u53f8\u5c0f\u5149\u5c31\u5f88\u8208\u596e\u7684\u8ddf\u5927\u982d\u6253\u62db\u547c\uff0c\u4e26\u4e14\u671f\u5f85\u9032\u5165\u4eca\u5929\u7684\u958b\u767c\u8005\u6a21\u5f0f\uff0c\u4e0d\u904e\u5c31\u548c\u6628\u591c\u4e00\u6a23\u5927\u982d\u4ecd\u5c31\u57cb\u982d\u5728\u6587\u4ef6\u4e4b\u4e2d\u5c08\u5fc3\u7684\u958b\u767c\u3002<br \/>\n\u300c\u4f60\u6628\u5929\u4e0d\u5c31\u5df2\u7d93\u958b\u767c\u4e86\u4e00\u500b\u5c08\u6848\u4e86\u55ce\uff1f\u300d<br \/>\n\u5927\u982d\u982d\u4e5f\u4e0d\u62ac\u7684\u56de\u4e86\u9019\u53e5\u8a71\uff0c\u9019\u6642\u5f77\u5f7f\u6709\u4e00\u96bb\u70cf\u9d09\u98db\u4e86\u904e\u53bb\u7684\u5c37\u5c2c\u6642\u523b\uff0c\u9019\u6642\u523b\u6709\u4e09\u79d2\u90a3\u9ebc\u4e45\u3002<br \/>\n\u300c\u54c8\u54c8\u54c8\uff0c\u958b\u73a9\u7b11\u7684\u5566\uff0c\u4eca\u5929\u5148\u9084\u662f\u8ddf\u4f60\u4ecb\u7d39dotnet cli\u5427\u300d<\/p>\n<h3>\u529f\u80fd\u4ecb\u7d39<\/h3>\n<p>\u4eca\u5929\u4e3b\u8981\u91dd\u5c0d\u9019\u6b21\u7cfb\u5217\u6587\u6703\u7528\u5230\u7684\u6307\u4ee4\u505a\u4ecb\u7d39\uff0c\u5982\u679c\u6709\u8208\u8da3\u6df1\u5165\u7814\u7a76\u7684\u670b\u53cb\u5011\u8acb\u5230<a href=\"https:\/\/docs.microsoft.com\/zh-tw\/dotnet\/core\/tools\/\" title=\".NET CLI \u7e3d\u89bd\" rel=\"nofollow noopener\" target=\"_blank\">.NET CLI \u7e3d\u89bd<\/a>\uff0c\u6240\u4ee5\u63a5\u4e0b\u4f86\u8981\u8aaa\u660e\u7684\u6307\u4ee4\u5982\u4e0b<\/p>\n<ul>\n<li>new<\/li>\n<li>run<\/li>\n<li>build<\/li>\n<li>add package<\/li>\n<\/ul>\n<p>\u63a5\u4e0b\u4f86\u91dd\u5c0d\u5404\u500b\u9805\u76ee\u8aaa\u7c21\u55ae\u8aaa\u660e\u4e00\u4e0b\u3002<\/p>\n<h4>new<\/h4>\n<p>\u9019\u500b<code>new<\/code>\u7684\u529f\u7528\u5f88\u5927\uff0c\u7c21\u55ae\u8b1b\u5c31\u662f\u7522\u751f\u6771\u897f\u7684\u6307\u4ee4\uff0c\u4ed6\u53ef\u4ee5\u7522\u751f\u7684\u6771\u897f\u5f88\u591a\u4f8b\u5982\u7522\u751f\u65b9\u6848\u3001\u5c08\u6848\u3001Control\u6216\u662fView\u90fd\u53ef\u4ee5\u7528\u9019\u500b\u6307\u4ee4\u7522\u751f\uff0c\u7c21\u55ae\u8b1b\u5c31\u662f\u7bc4\u672c\u5167\u7684\u90fd\u53ef\u4ee5\u7522\u751f\uff0c\u81f3\u65bc\u7bc4\u672c\u6709\u54ea\u4e9b\u53ef\u4ee5\u53c3\u8003<a href=\"https:\/\/docs.microsoft.com\/zh-tw\/dotnet\/core\/tools\/dotnet-new\" title=\"dotnet new\u547d\u4ee4\" rel=\"nofollow noopener\" target=\"_blank\">dotnet template<\/a>\uff0c\u5176\u4e2d\u6628\u5929\u5927\u982d\u4ea4\u7d66\u5c0f\u5149\u7684\u6307\u4ee4\u5c31\u662f\u5148\u7522\u751f\u4e00\u500b<code>console<\/code>\u7684\u5c08\u6848\u3002<\/p>\n<h4>run<\/h4>\n<p>\u9019\u500b<code>run<\/code>\u7684\u6307\u4ee4\u5c31\u662f\u7de8\u8b6f\u5f8c\u57f7\u884c\u5c08\u6848\u7684\u52d5\u4f5c\uff0c\u7c21\u55ae\u8b1b\u53ef\u4ee5\u60f3\u6210<code>build<\/code>\u5b8c\u5f8c\u52a0\u57f7\u884c\u3002<\/p>\n<h4>build<\/h4>\n<p>\u9019\u500b<code>build<\/code>\u5c31\u662f\u7de8\u8b6f\u5c08\u6848\uff0cdotnet\u7684\u7279\u6027\u5c31\u662f\u8981\u5148\u7d93\u904e\u7de8\u8b6f\u8b8a\u6210\u57f7\u884c\u6a94\u624d\u53ef\u4ee5\u57f7\u884c\uff0c\u6240\u4ee5\u8981\u624b\u52d5\u767c\u5e03\u7684\u8a71\u8981\u5148\u7d93\u904e<code>build<\/code>\u7684\u52d5\u4f5c\u3002<\/p>\n<h4>add package<\/h4>\n<p>\u9019\u500b<code>add package<\/code>\u7684\u6307\u4ee4\u5f88\u91cd\u8981\uff0c\u56e0\u70ba\u8981\u4f7f\u7528\u7b2c\u4e09\u65b9\u5957\u4ef6\u8981\u900f\u904e\u9019\u500b\u6307\u4ee4\u4f86\u4e0b\u8f09\u4e26\u8a2d\u5b9a\uff0c\u7c21\u55ae\u8b1b\u5c31\u662f<code>nodejs<\/code>\u7684<code>npm install<\/code>\u6216\u662fdotnet\u7684<code>nuget<\/code>\u3002<\/p>\n<h2>\u5f8c\u8a18<\/h2>\n<p>\u300c\u597d\u5566\uff0c\u4e00\u53e3\u6c23\u8aaa\u90a3\u9ebc\u591a\u662f\u6c92\u7528\u7684\uff0c\u4f60\u8981\u89aa\u81ea\u8a66\u8a66\u770b\u3002\u660e\u5929\u958b\u59cb\u8b93\u4f60\u7df4\u7fd2\u4e00\u4e0b\u7a0b\u5f0f\u958b\u767c\u5566\u3002\u300d<br \/>\n\u5927\u982d\u5c0d\u982d\u660f\u773c\u82b1\u7684\u5c0f\u5149\u9019\u9ebc\u8aaa\uff0c\u4eca\u5929\u5c31\u5728\u982d\u660f\u773c\u82b1\u7684\u6b77\u7a0b\u4e2d\u5ea6\u904e\u4e86\uff0c\u660e\u5929\u958b\u59cb\u5c07\u6703\u662f\u958b\u59cb\u9032\u5165C#\u7684\u4e16\u754c\u4e4b\u4e2d\u4e86\uff0c\u656c\u8acb\u671f\u5f85\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u7522\u751f\u4e86\u5c08\u6848\u4e4b\u5f8c \u6628\u5929\u7d93\u7531\u5927\u982d\u7684\u4ee3\u9818\u5c0f\u5149\u7d42\u65bc\u5b8c\u6210\u5efa\u7f6e\u74b0\u5883\uff0c\u4e26\u4e14\u4e5f\u7522\u751f\u4e86\u4ed6\u4eba\u751f\u4e2d\u7b2c\u4e00\u500b\u5c08\u6848\uff0c\u96d6\u7136\u6700\u5f8c\u5728Hello  &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.develop-note.com\/blog\/2021\/09\/17\/dotnet-cli\/\" class=\"more-link\">\u95b1\u8b80\u5168\u6587<span class=\"screen-reader-text\">\u3008D-28-dotnet cli ? build ? run\u3009<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"footnotes":""},"categories":[2],"tags":[90,96,92],"class_list":["post-1999","post","type-post","status-publish","format-standard","hentry","category-develop","tag-2021ironman","tag-dotnet-cli","tag-dotnetcore"],"_links":{"self":[{"href":"https:\/\/www.develop-note.com\/blog\/wp-json\/wp\/v2\/posts\/1999","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.develop-note.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.develop-note.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.develop-note.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.develop-note.com\/blog\/wp-json\/wp\/v2\/comments?post=1999"}],"version-history":[{"count":11,"href":"https:\/\/www.develop-note.com\/blog\/wp-json\/wp\/v2\/posts\/1999\/revisions"}],"predecessor-version":[{"id":2638,"href":"https:\/\/www.develop-note.com\/blog\/wp-json\/wp\/v2\/posts\/1999\/revisions\/2638"}],"wp:attachment":[{"href":"https:\/\/www.develop-note.com\/blog\/wp-json\/wp\/v2\/media?parent=1999"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.develop-note.com\/blog\/wp-json\/wp\/v2\/categories?post=1999"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.develop-note.com\/blog\/wp-json\/wp\/v2\/tags?post=1999"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}