Posts

Showing posts from December, 2021

Creating A Web Application Project Using Command line (.NET CLI)

Image
Creating A Web Application Project Using Command-line (.NET CLI) This tutorial shows step-by-step instructions to create an ASP.NET Core Web Application Project with individual user authentication. I use the Windows Power Shell command interface for this tutorial. At the time of writing this tutorial latest available .NET Core version is 6, while Visual Studio 2022 community is the latest available version. But I wanted to use and test an older application and custom template build using ASP.NET Core 2.2 and Visual Studio 2017. And I wanted to create several test projects but the old custom templates didn't work. And also most of the Microsoft documentation is changed, updated, or outdated. So most latest documents are based on the dotnet new command line. So I wanted to dig into the dotnet CLI. I know that this will be useful for me again later time or it will be useful to someone else.  Create directories  First, we create a directory for the template PS D:\dev\dotcli> mkdir

Work on a lower version of dotnet core

Image
Using a lower version of dotnet core in a PC has many dotnet core versions installed At the time of writing this tutorial latest available .NET Core version is 6, while Visual Studio 2022 community is the latest available version of the Visual Studio family. But I wanted to modify and test an older application build using ASP.NET Core 2.2 and Visual Studio 2017.  here are the versions available on my computer: Show the current version and more information about installed SDKs The current version is 6.0.0. But we want to create a project for the older version 2.2.   globaljson   is help on working on older dotnet core My working directory is     D:\dev\dotcli . We need to switch to the older version. To do that we need to add the   global.json   file to the working root folder by using  the command   globaljson .  PS D:\dev\dotcli> dotnet new globaljson --sdk-version 2.2.108 --force The   globaljson   command creates a   global.json   file Check the current version again PS D:\de