VS 2017 Error | Unable to start program, an operation is not legal in the current state | Visual Studio 2017

After installing Visual Studio 2017, most of the time we face errors like 'Unable to start program, An operation is not legal in the current state'. This error occurs when you run your first project. Sometime it get resolved by closing & reopening the Visual Studio 2017.

"Unable to start program 'xyz' An operation is not legal in the current state."

Here I am showing the way to resolve such errors:

1. Try to turn off JavaScript debugging for Chrome or other browsers as it is a new feature introduced in VS 2017.

Go to Tools > Options > Debugging > General and turn off the setting for Enable JavaScript Debugging for ASP.NET (Chrome and IE).

2. Also try to close all of your chrome instances, that you might have opened before you opened Visual Studio.Now stop debugging and try run your application again. If the debugger doesn't hit, refresh the browser again. You will not get the error again.

3. Here is another way to resolve this error. Try to kill all instances of Chrome using the Windows command line.
here is the command: taskkill /im chrome.exe /f

I hope these solutions will work for all.

Post a Comment

If you have any questions or concerns, please let me know.

Previous Post Next Post