Using the dotnet new command we create a web and an API project dotnet new webapp appname.web dotnet new webapi appname.api
Create a solution so that it wraps all the projects in one place dotnet new sln appname dotnet sln add appname.web appname.api
After building the Web and the API projects we need to create the launch.json which VScode refers to build and debug the application. For a complete reference on doing these projects consider this great resource.
You can always use VSCode terminal to run these above commands as well, also note you can open multiple terminals the same VSCode instance like this.
Setup the launch.json by clicking on add configuration and select .Net core web app. we will need to add two such configurations one for web and another for web api.
For web api you need to launch the browser on running the app…
The least we can to do when browsing using chrome is use incognito mode. So here is way to always open chrome in incognito mode use this argument for the application shortcut. --incognito
Open the properties of application shortcut and change as below
Here is what incognito mode does and what most people think is just the opposite. So incognito just makes sure that data like the history and the cookie are deleted when you close that window. It does not hide what you are browsing from the ISP or the software's that is running in your OS like the key logger or the antivirus etc.,
Happy browsing! Somewhat incognito 👽😜
When developing a web application we separate our application with *.web being initial server-side application and *.api application which will help us fetch/update data for client-side operations and avoid page reloads.