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
Simple answer: when you do publish, you call a script that launches the publish-iis tool (see script section in project.json).
In your project you have a web.config file with something like this:
As you see, there are placeholders "%LAUNCHER_PATH%" and %LAUNCHER_ARGS% parameters. Keep these in mind.
Now open your project.json file and you will see a "scripts" section looking something like this:
"scripts":
{
"postpublish":"dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%"
}
It tells dotnet to run the publish-iis tool after the application is published. How it works:
publish-iis tool goes to the folder where the application was published (not your project folder) and checks if it contains a web.config file. If it doesn’t, it will create one. If it does, it will check what kind of application you have (i.e. whether it is targeting full CLR or Core CLR and – for Core CLR – whether it is a portable or standalone application) and will set the values of the processPath and arguments attributes removing %LAUNCHER_PATH% and %LAUNCHER_ARGS% placeholders on the way.