I used to use asp.net mvc4 and in IIS my website\'s physical path would point my solution directory, and every time I update my code, I just re-build my solution and then I
Follow these steps to be able to achieve what you want.
In launchSettings.json, add a property named iis under iisSettings, like so:
"iis": {
"applicationUrl": "http://my.aspnetcoreapp.com"
}
Under the profiles section, add a new profile having commandName set to IIS. I am calling mine Local IIS. This will add a new option to the Run drop down named Local IIS.
"Local IIS": {
"commandName": "IIS",
"launchBrowser": true,
"launchUrl": "http://my.aspnetcoreapp.com",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
}
Create a website in IIS. Set host name to my.aspnetcoreapp.com. Also create/use an app pool for this website that has .NET CLR version set to "No Managed Code".
Add a loop back entry in the hosts file (for Windows C:\Windows\System32\drivers\etc\hosts)
127.0.0.1 my.aspnetcoreapp.com
Go back to Visual Studio, and run the application. Make sure you have "Local IIS" profile selected from Run drop-down. This will launch the application in the browser, at the URL, after a brief loading message that says "Provisioning IIS...".
You could also host your app under "Default Web Site", by specifying the ULR like localhost/MyAspNetCoreApp instead of my.aspnetcoreapp.com. If you do that, a new app pool will be created with the name MyAspNetCoreApp AppPool.
My medium article about this.