-
-
Save GaProgMan/a13edf042cee6a5d7fb6cf859e1d07f1 to your computer and use it in GitHub Desktop.
Code snippets for the blog article at 2016/10/06/hello-world-console-application
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mkdir helloworld | |
cd helloWorld | |
dotnet new | |
Created new C# project in /Your/Directory/Here. | |
dotnet restore | |
log : Lock file has not changed. Skipping lock file write. Path: /Your/Diretory/Here/project.lock.json | |
log : /Your/Diretory/Here/project.json | |
log : Restore completed in 1208ms. | |
dotnet build | |
Project HelloWorld (.NETCoreApp,Version=v1.0) will be compiled because expected outputs are missing | |
Compiling HelloWorld for .NETCoreApp,Version=v1.0 | |
Compilation succeeded. | |
0 Warning(s) | |
0 Error(s) | |
Time elapsed 00:00:01.7556973 | |
dotnet run | |
Project HelloWorld (.NETCoreApp,Version=v1.0) was previously compiled. Skipping compilation. | |
Hello World! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var outputKind = compilerOptions.EmitEntryPoint.GetValueOrDefault() ? | |
OutputKind.ConsoleApplication : OutputKind.DynamicallyLinkedLibrary; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
namespace ConsoleApplication | |
{ | |
public class Program | |
{ | |
public static void Main(string[] args) | |
{ | |
Console.WriteLine("Hello World!"); | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"version": "1.0.0-*", | |
"buildOptions": { | |
"debugType": "portable", | |
"emitEntryPoint": true | |
}, | |
"dependencies": {}, | |
"frameworks": { | |
"netcoreapp1.0": { | |
"dependencies": { | |
"Microsoft.NETCore.App": { | |
"type": "platform", | |
"version": "1.0.0" | |
} | |
}, | |
"imports": "dnxcore50" | |
} | |
} | |
} | |
"dependencies": { | |
"Newtonsoft.Json" : "9.0.1" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment