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.
Asked
Active
Viewed 2,443 times
1 Answers
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"
}
}

Christoph Stettner
- 34
- 1
- 2
-
1Did so. Getting the following in the console: `Using launch settings from
System.ArgumentNullException: Value cannot be null. Parameter name: key at System.ThrowHelper.ThrowArgumentNullException(ExceptionArgument argument) at System.Collections.Generic.Dictionary2.FindEntry(TKey key) at System.Collections.Generic.Dictionary2.ContainsKey(TKey key) at Microsoft.DotNet.Tools.Run.LaunchSettings.LaunchSettingsManager.Try.... at Microsoft.DotNet.Cli.Program.Main(String[] args) watch : Exited with error code 1` – Bahaa Jan 04 '18 at 11:15