What is the most popular thing about blowing water between apes in the last two days? That Cliff is Oracle to give up java!. You just have to laugh and wake up! As the company's product line turned to Java, hard study Java technology has been in the past few months. has been quietly decided, if the message proves to be true, I immediately burned the most recently chewed "Spring in action" ~
I used to write some C # gadgets with Xamarin studio, this time seeing. NET core is open source and can be used in the production environment, I also come to gather the excitement.
0. Installing homebrew
Homebrew short "Brew" is the Package Manager under Mac, it can be easily managed software package, similar to Linux under the APT, Yum. The installation of brew is simple, just execute a ruby command, and fortunately, Ruby is already integrated on the MAC system.
The following command is copied from the homebrew official website, directly in the terminal window paste, execute, a little later, you need to enter a password in the middle.
/usr/bin/ruby-e "$ (curl-fssl https://raw.githubusercontent.com/Homebrew/install/master/install)"
1. Use Brew to install the latest version of OpenSSL
Perform the following three commands in the terminal, which are slightly slower to install and wait patiently.
Brew updatebrew Install opensslbrew link--force OpenSSL
2. Install the. NET Core SDKThe most convenient is to download the offline version of the. NET Core installation package, which automatically configures environment variables. Do https://www.microsoft.com/net/download find MacOS version download. You can also download the latest version at this point directly.
After the installation is completed, enter the dotnet command test and the discovery is in effect (note that a "terminal" window needs to be restarted after installation):
3. Create a Web project with the new command
Here I use mkdir hellonetcore, create a "hellonetcore" directory, enter this directory, use "Dotnet new-t Web" to create a simple Web project.
However the light creating a project is far from enough, here also need to recover the program from NuGet dependency package in the Project.json file. This process can take several minutes, using the following command:
dotnet Restore
After the full download of the dependent package is complete, you can run the project:
Dotnet Run
Effect
Postscript:
After developing the. NET Core program, you can only use Vscode? How to feel that MS is fooling us, although not seriously used it developed, but how to see it is like a toy, it can be competent for large projects?
. NET Core Experience-run the first Web sample program under a Mac