Fragrance
|
Today I thought of starting a series of blog on Asp.net core. So before start coding we need to download and install Asp.net core. You can browse to https://www.microsoft.com/net/download and download .net core. You can download the binaries or can even download the tools which will integrate directly to Visual Studio 2017. You can download Visual Studio 2017 Community version from www.visualstudio.com After downloading and installing, we can directly start with the basic code. Let's create a sample hello world program. Dotnet core comes with command line called "dotnet" and it has number of commands you can use. We will start with the basic command "new", "restore" and "build".
Now I will start with a simple dotnet console application. So I will type "dotnet new console" in the command prompt and it will quickly create the console application. Now if you open program.cs file, you will see that it's a simple Hello World console program.
Now my second command will be "dotnet restore". Currently it won't do anything since there are no dependency on any NuGet package. If our application has any nuget package to download than restore command will get all the required nuget dependency. After restoring, now let's build our project by typing the command "dotnet build" and with this it will create the corresponding dll. Now the last thing is "dotnet run", and it will run our console application. This is just basic console application which we created using dotnet core. In my next blog of this series we will create an actual web project using Visual Studio.
Comments
|
Categories
All
Archives
May 2020
|