Since the launch of the 1.0 release in 2016, the. Net core is now in its 2.1 version, and in its roadmap plan the 3.0 version will be released next year, a development that cannot be said to be swift. Many companies have gradually started to upgrade their systems to the latest. NET core platform after a cautious wait-and-see period, so it is time to start developing. NET Core development.
Because. Net core supports Linux and Mac systems outside of the Windows system, when choosing a development environment, there is no need to be confined to the original Windows platform, where I chose the Mac platform.
The development hardware device is a 14 Apple Macbook Air with an operating system of MacOS Sierra.
Development tools do not use the powerful Visual Studio IDE, on the one hand, the performance of the hardware device is not enough, but also want to test another editor Visual Studio code can also do most of the development work.
The first step in building a development environment starts with installing the. Net Core SDK. You can find the installation package you want from the official website of Microsoft: SDK, the current version is v2.1.301.
After the installation is complete, the command-line window (I use Iterm) performs a dotnet --version
validation of whether the installation was successful.
Next is to download and install the Visual Studio Code Editor, VSC.
After you've completed these two steps, you can start writing the first program.
In the command-line window dotnet new console -o helloApp
, open the newly created HelloApp folder with Visual Studio Code (hereinafter referred to as VSC). The underlying files and folders have been built to help you through the above commands.
Click on the Program.cs file and you will find that in the lower right corner of the VSC you are recommended to install the expansion pack for C #, just click the Install button, which is the expansion pack you need to develop your C # program.
All VSC expansion packs will need to reload the VSC after installation to take effect, so please click the Reload button again.
After reloading, a new prompt box appears at the bottom right corner:
Clicking Yes will automatically generate a new. Vscode folder, where the files are important and are compiled with debugging-related configurations.
At this point, another Hello World program comes to life.
If you want to run this line of the program also need a very simple command, you can directly in the VSC through the CTRL + ~ shortcut keys to bring up the command line window, enter dotnet run
after the return.
. Net Core development logs-starting with building a development environment