问题
I'm trying to run my web application in watch mode referring to How to watch for file changes "dotnet watch" with Visual Studio ASP.NET Core but in newer version (core 1.1.1) I can't find launchSettings.json file, so where put settings? I installed Microsoft.DotNet.Watcher.Tools but I don't have a button "watch" in Visual Studio.
回答1:
You can find the launchSettings.json in the Solution Explorer under the menu Properties. There you can add the settings for your "watch" profile.
You can add following profile settings:
"Watch": {
"executablePath": "C:\\Program Files\\dotnet\\dotnet.exe",
"commandLineArgs": "watch run",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
}
launchSettings.json in Solution Explorer
来源:https://stackoverflow.com/questions/42703858/how-to-launch-watch-mode-in-visual-studio-2017-asp-net-core-1-1-1