{"id":1556,"date":"2018-04-14T17:28:31","date_gmt":"2018-04-14T21:28:31","guid":{"rendered":"http:\/\/www.ObiOberoi.com\/?p=1556"},"modified":"2018-04-14T17:28:31","modified_gmt":"2018-04-14T21:28:31","slug":"how-to-publish-and-execute-a-net-core-console-app","status":"publish","type":"post","link":"https:\/\/obioberoi.com\/?p=1556","title":{"rendered":"How to Publish and Execute a .NET Core Console App!"},"content":{"rendered":"<p>Publishing a .NET Core app is as easy as 1,2,3. Here&#8217;s how:<\/p>\n<p>After you have created the console app, make sure you select <strong>Release<\/strong> from the Solution Configurations drop-down menu.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1560\" src=\"https:\/\/obioberoi.com\/wp-content\/uploads\/2018\/05\/Release.jpg\" alt=\"\" width=\"410\" height=\"101\" \/>\u00a0 Now right-click on the project node inside <strong>Solution Explorer<\/strong> and choose <strong>Publish<\/strong> from the menu item. See image below:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1558\" src=\"\/wp-content\/uploads\/2018\/05\/Publish-1.jpg\" alt=\"\" width=\"591\" height=\"372\" \/><\/p>\n<p>Hit Publish, and you are set!<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1562\" src=\"https:\/\/obioberoi.com\/wp-content\/uploads\/2018\/05\/PublishProfile.jpg\" alt=\"\" width=\"461\" height=\"154\" \/>In order to run the app from command prompt, the quick and easy way to navigate to the location where the .dll is stored, you can do the following:<\/p>\n<ul>\n<li>Open Windows Explorer<\/li>\n<li>Navigate to the DLL file. It&#8217;ll be your project Name with a .DLL extension<\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1565\" src=\"https:\/\/obioberoi.com\/wp-content\/uploads\/2018\/05\/Navigate-1-1.jpg\" alt=\"\" width=\"558\" height=\"177\" \/><\/p>\n<ul>\n<li>Point your cursor to the start of your drive (see image below) and type <strong>cmd<\/strong> followed by space and hit Enter. This neat shortcut will take you straight to the command prompt.<\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1566\" src=\"\/wp-content\/uploads\/2018\/05\/Command-1.jpg\" alt=\"\" width=\"540\" height=\"42\" \/><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1567\" src=\"\/wp-content\/uploads\/2018\/05\/CommandPrompt-1.jpg\" alt=\"\" width=\"806\" height=\"130\" \/><\/p>\n<ul>\n<li>In order to run your program, you need to type: dotnet xxx.dll where xxx is your file name<\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1569\" src=\"\/wp-content\/uploads\/2018\/05\/Success-1.jpg\" alt=\"\" width=\"942\" height=\"140\" \/> That&#8217;s it!<\/p>\n<p>Happy Consoling \ud83d\ude42 <\/p>\n","protected":false},"excerpt":{"rendered":"<p>Publishing a .NET Core app is as easy as 1,2,3. Here&#8217;s how: After you have created the console app, make sure you select Release from the Solution Configurations drop-down menu. \u00a0 Now right-click on the project node inside Solution Explorer &hellip; <a href=\"https:\/\/obioberoi.com\/?p=1556\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[12,15],"class_list":["post-1556","post","type-post","status-publish","format-standard","hentry","category-net","tag-build-net-core-console-app","tag-deploy-net-core-console-app"],"_links":{"self":[{"href":"https:\/\/obioberoi.com\/index.php?rest_route=\/wp\/v2\/posts\/1556","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/obioberoi.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/obioberoi.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/obioberoi.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/obioberoi.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1556"}],"version-history":[{"count":0,"href":"https:\/\/obioberoi.com\/index.php?rest_route=\/wp\/v2\/posts\/1556\/revisions"}],"wp:attachment":[{"href":"https:\/\/obioberoi.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1556"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/obioberoi.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1556"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/obioberoi.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1556"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}