How to launch watch mode in Visual Studio 2017 ASP.NET Core 1.1.1

强颜欢笑 提交于 2021-02-11 09:19:45

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!