{"id":507,"date":"2017-06-19T23:30:59","date_gmt":"2017-06-19T14:30:59","guid":{"rendered":"http:\/\/www.typea.info\/blog\/index.php\/2017\/06\/19\/visual_studio_code_c_exe\/"},"modified":"2017-06-19T23:30:59","modified_gmt":"2017-06-19T14:30:59","slug":"visual_studio_code_c_exe","status":"publish","type":"post","link":"https:\/\/www.typea.info\/blog\/index.php\/2017\/06\/19\/visual_studio_code_c_exe\/","title":{"rendered":"Visual Studio Code \u3067 C# \u30b3\u30f3\u30bd\u30fc\u30eb\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u30c7\u30d0\u30c3\u30b0\u3068Exe\u3092\u751f\u6210"},"content":{"rendered":"<p><a href=\"https:\/\/www.amazon.co.jp\/%E5%AE%9F%E8%B7%B5%E9%96%8B%E7%99%BA%E6%89%8B%E6%B3%95-%E3%83%9E%E3%82%A4%E3%82%AF%E3%83%AD%E3%82%BD%E3%83%95%E3%83%88%E5%85%AC%E5%BC%8F%E8%A7%A3%E8%AA%AC%E6%9B%B8-Gary-McLean-Hall\/dp\/4822298477\/ref=as_li_ss_il?ie=UTF8&amp;qid=1497882446&amp;sr=8-8&amp;keywords=C#&amp;linkCode=li2&amp;tag=typea09-22&amp;linkId=a4b4c4d746eb739af81e9ffdce362381\" target=\"_blank\"><img decoding=\"async\" src=\"\/\/ws-fe.amazon-adsystem.com\/widgets\/q?_encoding=UTF8&amp;ASIN=4822298477&amp;Format=_SL160_&amp;ID=AsinImage&amp;MarketPlace=JP&amp;ServiceVersion=20070822&amp;WS=1&amp;tag=typea09-22\" border=\"0\"><\/a><img loading=\"lazy\" decoding=\"async\" width=\"1\" height=\"1\" style=\"margin: 0px !important; border: currentcolor !important; border-image: none !important !important;\" alt=\"\" src=\"https:\/\/ir-jp.amazon-adsystem.com\/e\/ir?t=typea09-22&amp;l=li2&amp;o=9&amp;a=4822298477\" border=\"0\"><\/p>\n<p><a href=\"http:\/\/typea.info\/blg\/glob\/visual-studio-code\/\">Visual Studio Code<\/a> \u304c\u3067\u304d\u308b\u5b50\u306a\u306e\u3067\u3001\u958b\u767a\u74b0\u5883\u3092\u3088\u305b\u3066\u3044\u3063\u3066\u307e\u3059\u3002<\/p>\n<p>C#\u306e\u3061\u3087\u3063\u3068\u3057\u305f\u691c\u8a3c\u3068\u304b\u3092\u884c\u3046\u306e\u306b Visual Studio \u7acb\u3061\u4e0a\u3052\u308b\u306e\u306f\u91cd\u3044\u306e\u3067\u3001Visual Studio Code \u3067\u3067\u304d\u308b\u3068\u3044\u3044\u611f\u3058\u3002\u6614\u306eSharpDevelop\u307f\u305f\u3044\u306b\u3002\u3063\u3066\u3001\u4eca\u3067\u3082\u3042\u308b\u304b\u3002<\/p>\n<p>\u3068\u3044\u3046\u3053\u3068\u3067\u3001\u4ee5\u4e0b\u3092\u53c2\u8003\u306b\u69cb\u7bc9\u3059\u308b\u3002<\/p>\n<p><a title=\"https:\/\/docs.microsoft.com\/ja-jp\/dotnet\/csharp\/getting-started\/with-visual-studio-code\" href=\"https:\/\/docs.microsoft.com\/ja-jp\/dotnet\/csharp\/getting-started\/with-visual-studio-code\">https:\/\/docs.microsoft.com\/ja-jp\/dotnet\/csharp\/getting-started\/with-visual-studio-code<\/a><\/p>\n<h2>1. .NET Core\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h2>\n<h3>1.1 .NET Core<\/h3>\n<p><a title=\"https:\/\/docs.microsoft.com\/ja-jp\/dotnet\/core\/\" href=\"https:\/\/docs.microsoft.com\/ja-jp\/dotnet\/core\/\">https:\/\/docs.microsoft.com\/ja-jp\/dotnet\/core\/<\/a><\/p>\n<p>Visual Studio Code\u3067C#\u3092\u4f7f\u3046\u306b\u306f\u3001.NET Core SDK \u3092\u4f7f\u7528\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u3088\u3046\u3060\u3002<\/p>\n<p>.NET Core \u3068\u306f\u3001\u3059\u3079\u3066\u306e.NET\u30e9\u30f3\u30bf\u30a4\u30e0\u3067\u5b9f\u884c\u3067\u304d\u308b\u3053\u3068\u3092\u76ee\u7684\u3068\u3057\u305fAPI\u306e\u6b63\u5f0f\u4ed5\u69d8\u3067\u3042\u308b <a href=\"https:\/\/docs.microsoft.com\/ja-jp\/dotnet\/standard\/library\">.NET\u6a19\u6e96\u30e9\u30a4\u30d6\u30e9\u30ea<\/a>\u3092\u5b9f\u88c5\u3057\u305f\u3001\u30af\u30ed\u30b9\u30d7\u30e9\u30c3\u30c8\u30d5\u30a9\u30fc\u30e0(Windows,macOs,Linux) \u3067\u3001\u30aa\u30fc\u30d7\u30f3\u30bd\u30fc\u30b9(MIT,apache2 \u30e9\u30a4\u30bb\u30f3\u30b9) \u306a\u958b\u767a\u30d7\u30e9\u30c3\u30c8\u30d5\u30a9\u30fc\u30e0\u3002<\/p>\n<p><a href=\"https:\/\/docs.microsoft.com\/ja-jp\/dotnet\/standard\/library\">.NET\u6a19\u6e96\u30e9\u30a4\u30d6\u30e9\u30ea<\/a> \u3092\u901a\u3057\u3066\u3001.NET Framework\u3001Xamarin\u3001Mono \u3068\u4e92\u63db\u6027\u304c\u3042\u308a\u3001Microsoft\u306b\u3088\u3063\u3066\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u3044\u308b\u3002<\/p>\n<p><a href=\"https:\/\/docs.microsoft.com\/ja-jp\/dotnet\/core\/deploying\/\">\u81ea\u5df1\u5b8c\u7d50\u578b\u306e\u5c55\u958b<\/a> \u3068\u3057\u3066\u3001.NET Core \u30e9\u30a4\u30d6\u30e9\u30ea\u3001.NET Core \u30e9\u30f3\u30bf\u30a4\u30e0\u3059\u3079\u3066\u3092\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306b\u542b\u3093\u3067\u5c55\u958b\u3092\u884c\u3046\u3053\u3068\u304c\u53ef\u80fd\u3068\u306a\u3063\u3066\u3044\u308b\u3002<\/p>\n<h3>1.2 \u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3068\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h3>\n<p><a title=\"https:\/\/www.microsoft.com\/net\/download\/core\" href=\"https:\/\/www.microsoft.com\/net\/download\/core\">https:\/\/www.microsoft.com\/net\/download\/core<\/a><\/p>\n<p>\u4e0a\u8a18\u304b\u3089SDK\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u3066\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3002<\/p>\n<p><a href=\"https:\/\/www.typea.info\/blog\/wp-content\/uploads\/image\/Visual-Studio-Code--C_961\/vscode_with_cs01.jpg\"><img loading=\"lazy\" decoding=\"async\" width=\"343\" height=\"233\" title=\"vscode_with_cs01\" style=\"display: inline; background-image: none;\" alt=\"vscode_with_cs01\" src=\"https:\/\/www.typea.info\/blog\/wp-content\/uploads\/image\/Visual-Studio-Code--C_961\/vscode_with_cs01_thumb.jpg\" border=\"0\"><\/a><\/p>\n<h2>2. C# \u62e1\u5f35\u6a5f\u80fd\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h2>\n<p><a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=ms-vscode.csharp\">https:\/\/marketplace.visualstudio.com\/items?itemName=ms-vscode.csharp<\/a><\/p>\n<p>Visual Studio Code\u3092\u8d77\u52d5\u3057\u3001\u4ee5\u4e0b\u3092\u5b9f\u884c<\/p>\n<ul>\n<li>Ctrl + p<\/li>\n<li>ext install csharp<\/li>\n<li>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/li>\n<\/ul>\n<p><a href=\"https:\/\/www.typea.info\/blog\/wp-content\/uploads\/image\/Visual-Studio-Code--C_961\/vscode_with_cs02.jpg\"><img loading=\"lazy\" decoding=\"async\" width=\"447\" height=\"227\" title=\"vscode_with_cs02\" style=\"display: inline; background-image: none;\" alt=\"vscode_with_cs02\" src=\"https:\/\/www.typea.info\/blog\/wp-content\/uploads\/image\/Visual-Studio-Code--C_961\/vscode_with_cs02_thumb.jpg\" border=\"0\"><\/a><\/p>\n<h2>3. \u30b3\u30f3\u30bd\u30fc\u30eb\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u4f5c\u6210<\/h2>\n<h3>3.1 Visual&nbsp; Studio Code \u3067\u3001\u4ee5\u4e0b\u306e\u30ad\u30fc\u3092\u62bc\u4e0b\u3057\u7aef\u672b\u3092\u8d77\u52d5\u3059\u308b\u3002<\/h3>\n<p>Ctrl + @<\/p>\n<h3>3.2 \u30b3\u30f3\u30bd\u30fc\u30eb\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u4f5c\u6210<\/h3>\n<pre class=\"prettyprint linenums\">PS C:\\workspaces\\vscode\\cslesson&gt; dotnet new cnsole<\/pre>\n<p><a href=\"https:\/\/www.typea.info\/blog\/wp-content\/uploads\/image\/Visual-Studio-Code--C_961\/vscode_with_cs03.jpg\"><img loading=\"lazy\" decoding=\"async\" width=\"626\" height=\"268\" title=\"vscode_with_cs03\" style=\"display: inline; background-image: none;\" alt=\"vscode_with_cs03\" src=\"https:\/\/www.typea.info\/blog\/wp-content\/uploads\/image\/Visual-Studio-Code--C_961\/vscode_with_cs03_thumb.jpg\" border=\"0\"><\/a><\/p>\n<p>Hello world \u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u304c\u4f5c\u6210\u3055\u308c\u305f\u3002<\/p>\n<p><a href=\"https:\/\/www.typea.info\/blog\/wp-content\/uploads\/image\/Visual-Studio-Code--C_961\/vscode_with_cs04.jpg\"><img loading=\"lazy\" decoding=\"async\" width=\"623\" height=\"342\" title=\"vscode_with_cs04\" style=\"display: inline; background-image: none;\" alt=\"vscode_with_cs04\" src=\"https:\/\/www.typea.info\/blog\/wp-content\/uploads\/image\/Visual-Studio-Code--C_961\/vscode_with_cs04_thumb.jpg\" border=\"0\"><\/a><\/p>\n<h3>3.3 \u30d3\u30eb\u30c9\u306b\u5fc5\u8981\u306a.NET Core \u30d1\u30c3\u30b1\u30fc\u30b8\u306b\u30a2\u30af\u30bb\u30b9<\/h3>\n<pre class=\"prettyprint linenums\">PS C:\\workspaces\\vscode\\cslesson&gt; dotnet restore<\/pre>\n<h2>4.\u5b9f\u884c<\/h2>\n<pre class=\"prettyprint linenums\">PS C:\\workspaces\\vscode\\cslesson&gt; dotnet run<\/pre>\n<p>\u5b9f\u884c\u3055\u308c\u305f\uff01<\/p>\n<p><a href=\"https:\/\/www.typea.info\/blog\/wp-content\/uploads\/image\/Visual-Studio-Code--C_961\/vscode_with_cs05.jpg\"><img loading=\"lazy\" decoding=\"async\" width=\"552\" height=\"170\" title=\"vscode_with_cs05\" style=\"display: inline; background-image: none;\" alt=\"vscode_with_cs05\" src=\"https:\/\/www.typea.info\/blog\/wp-content\/uploads\/image\/Visual-Studio-Code--C_961\/vscode_with_cs05_thumb.jpg\" border=\"0\"><\/a><\/p>\n<h2>5.\u30c7\u30d0\u30c3\u30b0<\/h2>\n<p>\u30d6\u30ec\u30fc\u30af\u30dd\u30a4\u30f3\u30c8\u3092\u306f\u3063\u305f\u308a\u3001\u30b9\u30c6\u30c3\u30d7\u5b9f\u884c\u3092\u3059\u308b\u3002<\/p>\n<p>\u300cRequired assets to build and debug are missing from \u2018{app name}\u2019. Add them?\u300d\u3068\u805e\u304b\u308c\u308b\u306e\u3067\u3001Yes \u3092\u9078\u629e\u3059\u308b\u3002<\/p>\n<p><a href=\"https:\/\/www.typea.info\/blog\/wp-content\/uploads\/image\/Visual-Studio-Code--C_961\/vscode_with_cs06.jpg\"><img loading=\"lazy\" decoding=\"async\" width=\"872\" height=\"69\" title=\"vscode_with_cs06\" style=\"display: inline; background-image: none;\" alt=\"vscode_with_cs06\" src=\"https:\/\/www.typea.info\/blog\/wp-content\/uploads\/image\/Visual-Studio-Code--C_961\/vscode_with_cs06_thumb.jpg\" border=\"0\"><\/a><\/p>\n<p>F5 \u3067\u30c7\u30d0\u30c3\u30b0\u5b9f\u884c\u3002<\/p>\n<p>\u5de6\u7aef\u304b\u3089\u3001\u866b\u306e\u30a2\u30a4\u30b3\u30f3\u3092\u62bc\u3057\u3066\u3001\u4e0a\u90e8\u306e \u518d\u751f\u30dc\u30bf\u30f3\u304b\u3089\u3001\u300c.NET Core launch(console)\u300d\u306e\u5b9f\u884c\u3067\u3082\u3088\u3044\u3002\u6b6f\u8eca\u30a2\u30a4\u30b3\u30f3\u304b\u3089\u3001\u8d77\u52d5\u30d1\u30e9\u30e1\u30fc\u30bf\u306a\u3069\u306e\u8a2d\u5b9a\u3082\u53ef\u80fd\u3002<\/p>\n<p><a href=\"https:\/\/www.typea.info\/blog\/wp-content\/uploads\/image\/Visual-Studio-Code--C_961\/vscode_with_cs07.jpg\"><img loading=\"lazy\" decoding=\"async\" width=\"675\" height=\"367\" title=\"vscode_with_cs07\" style=\"display: inline; background-image: none;\" alt=\"vscode_with_cs07\" src=\"https:\/\/www.typea.info\/blog\/wp-content\/uploads\/image\/Visual-Studio-Code--C_961\/vscode_with_cs07_thumb.jpg\" border=\"0\"><\/a><\/p>\n<p><a title=\"https:\/\/github.com\/OmniSharp\/omnisharp-vscode\/blob\/master\/debugger.md\" href=\"https:\/\/github.com\/OmniSharp\/omnisharp-vscode\/blob\/master\/debugger.md\">https:\/\/github.com\/OmniSharp\/omnisharp-vscode\/blob\/master\/debugger.md<\/a><\/p>\n<h2>6.\u5c55\u958b<\/h2>\n<p><a href=\"https:\/\/docs.microsoft.com\/ja-jp\/dotnet\/core\/deploying\/\">.NET Core \u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u5c55\u958b<\/a><\/p>\n<p><a href=\"https:\/\/docs.microsoft.com\/ja-jp\/dotnet\/core\/deploying\/deploy-with-cli\">Deployint .NET Core apps with command-line interface (CLI) tools<\/a><\/p>\n<h3>6.1 \u30b3\u30f3\u30bd\u30fc\u30eb Exe \u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u4f5c\u6210\u3059\u308b\u3002<\/h3>\n<p>\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u30d5\u30a1\u30a4\u30eb .csproj \u3092\u958b\u304d\u3001RuntimeIdentifiers \u306b\u3001\u5bfe\u8c61\u30bf\u30fc\u30b2\u30c3\u30c8\u3092\u6307\u5b9a\u3059\u308b\u3002<\/p>\n<pre class=\"prettyprint linenums\">&lt;PropertyGroup&gt;\r\n &lt;OutputType&gt;Exe&lt;\/OutputType&gt;\r\n &lt;TargetFramework&gt;netcoreapp1.1&lt;\/TargetFramework&gt;\r\n &lt;RuntimeIdentifiers&gt;win10-x64&lt;\/RuntimeIdentifiers&gt;\r\n&lt;\/PropertyGroup&gt;<\/pre>\n<h3>6.2 \u30d3\u30eb\u30c9<\/h3>\n<pre class=\"prettyprint linenums\">&gt; dotnet restore<\/pre>\n<p>\u30c7\u30d0\u30c3\u30b0\u30d3\u30eb\u30c9<\/p>\n<pre class=\"prettyprint linenums\">&gt; dotnet build<\/pre>\n<p>\u30bf\u30fc\u30b2\u30c3\u30c8\u3092\u6307\u5b9a\u3057\u3066\u30d3\u30eb\u30c9<\/p>\n<pre class=\"prettyprint linenums\">&gt; dotnet publish -c Release -r win10-x64<\/pre>\n<p>\/bin\/Release\/netcoreapp1.1\/win10-x64\/&nbsp; \u4ee5\u4e0b\u306b\u3000EXE\u304c\u751f\u6210\u3055\u308c\u305f\u3002<\/p>\n<p><a href=\"https:\/\/www.typea.info\/blog\/wp-content\/uploads\/image\/Visual-Studio-Code--C_961\/vscode_with_cs08.jpg\"><img loading=\"lazy\" decoding=\"async\" width=\"721\" height=\"357\" title=\"vscode_with_cs08\" style=\"display: inline; background-image: none;\" alt=\"vscode_with_cs08\" src=\"https:\/\/www.typea.info\/blog\/wp-content\/uploads\/image\/Visual-Studio-Code--C_961\/vscode_with_cs08_thumb.jpg\" border=\"0\"><\/a><\/p>\n<p>\u5b9f\u884c\u3057\u3066\u307f\u308b\u3002<\/p>\n<p><a href=\"https:\/\/www.typea.info\/blog\/wp-content\/uploads\/image\/Visual-Studio-Code--C_961\/vscode_with_cs09.jpg\"><img loading=\"lazy\" decoding=\"async\" width=\"539\" height=\"171\" title=\"vscode_with_cs09\" style=\"display: inline; background-image: none;\" alt=\"vscode_with_cs09\" src=\"https:\/\/www.typea.info\/blog\/wp-content\/uploads\/image\/Visual-Studio-Code--C_961\/vscode_with_cs09_thumb.jpg\" border=\"0\"><\/a><\/p>\n<p>OK\uff01<\/p>\n<p><a href=\"https:\/\/www.amazon.co.jp\/%E5%AE%9F%E8%B7%B5%E9%96%8B%E7%99%BA%E6%89%8B%E6%B3%95-%E3%83%9E%E3%82%A4%E3%82%AF%E3%83%AD%E3%82%BD%E3%83%95%E3%83%88%E5%85%AC%E5%BC%8F%E8%A7%A3%E8%AA%AC%E6%9B%B8-Gary-McLean-Hall\/dp\/4822298477\/ref=as_li_ss_il?ie=UTF8&amp;qid=1497882446&amp;sr=8-8&amp;keywords=C#&amp;linkCode=li2&amp;tag=typea09-22&amp;linkId=a4b4c4d746eb739af81e9ffdce362381\" target=\"_blank\"><img decoding=\"async\" src=\"\/\/ws-fe.amazon-adsystem.com\/widgets\/q?_encoding=UTF8&amp;ASIN=4822298477&amp;Format=_SL160_&amp;ID=AsinImage&amp;MarketPlace=JP&amp;ServiceVersion=20070822&amp;WS=1&amp;tag=typea09-22\" border=\"0\"><\/a><img loading=\"lazy\" decoding=\"async\" width=\"1\" height=\"1\" style=\"margin: 0px !important; border: currentcolor !important; border-image: none !important;\" alt=\"\" src=\"https:\/\/ir-jp.amazon-adsystem.com\/e\/ir?t=typea09-22&amp;l=li2&amp;o=9&amp;a=4822298477\" border=\"0\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Visual Studio Code \u304c\u3067\u304d\u308b\u5b50\u306a\u306e\u3067\u3001\u958b\u767a\u74b0\u5883\u3092\u3088\u305b\u3066\u3044\u3063\u3066\u307e\u3059\u3002 C#\u306e\u3061\u3087\u3063\u3068\u3057\u305f\u691c\u8a3c\u3068\u304b\u3092\u884c\u3046\u306e\u306b Visual Studio \u7acb\u3061\u4e0a\u3052\u308b\u306e\u306f\u91cd\u3044\u306e\u3067\u3001Visual Studio Code \u3067\u3067\u304d [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"sns_share_botton_hide":"","vkExUnit_sns_title":"","_vk_print_noindex":"","sitemap_hide":"","_veu_custom_css":"","veu_display_promotion_alert":"","vkexunit_cta_each_option":"","footnotes":""},"categories":[77,96],"tags":[],"class_list":["post-507","post","type-post","status-publish","format-standard","hentry","category-c","category-visual-studio-code"],"veu_head_title_object":{"title":"","add_site_title":""},"_links":{"self":[{"href":"https:\/\/www.typea.info\/blog\/index.php\/wp-json\/wp\/v2\/posts\/507","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.typea.info\/blog\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.typea.info\/blog\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.typea.info\/blog\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.typea.info\/blog\/index.php\/wp-json\/wp\/v2\/comments?post=507"}],"version-history":[{"count":0,"href":"https:\/\/www.typea.info\/blog\/index.php\/wp-json\/wp\/v2\/posts\/507\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.typea.info\/blog\/index.php\/wp-json\/wp\/v2\/media?parent=507"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.typea.info\/blog\/index.php\/wp-json\/wp\/v2\/categories?post=507"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.typea.info\/blog\/index.php\/wp-json\/wp\/v2\/tags?post=507"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}