.Net Core is now RC2 and is hopefully going to be stable and not see major changes. Some very basic developmental structural changes happened across RC1 and RC2 so this is never guaranteed though. RC2 has much cleaner and consistent (with other programming languages) development experience which usually is something like following.
- Download and install the language
- Create a program
- Compile and run it
You can follow these steps below to get up and running with your first .Net core Hello World project.
- Download and install .Net core from https://www.microsoft.com/net/core#windows
- Open command prompt and create a new directory and 'cd' to that directory
- mkdir newproject
- cd newproject
- Create a new .Net core project in the 'newproject' directory that we created above.
- dotnet new
- Restore all the dependencies for the project
- dotnet restore
- Compile and run
- dotnet run
That is all. You have your first .Net Core Hello World! program up and running.
I have created a chocolatey pacage so that .Net core SDK can be installed from command like itself. This package is located here.
With chocolatey, the steps then become as follows.
- Install .Net core. Note the -pre that is required because it is a prelease version of .net core. It will install latest .Net core which is RC2 as of this post. This installs .net core and updates the PATH so that 'dotnet' command is available from the command prompt.
- choco install dotnetcoresdk -pre -y
- Refresh PATH for current command prompt session. Chocolatey comes up with pretty neat command for this.
- refreshenv
- Create a new project directory and go to that directory
- mkdir newproject
- cd newproject
- Create new project
- dotnet new
- Restore all the dependencies for the project
- dotnet restore
- Compile and run
- dotnet run
That's it. You have a.net core application running while never had to leave the command prompt.