How to fix error “Changes are not allowed while code is running” in .Net

If you have tried to modify your back code in .Net when your application is running and found this annoying message:
Changes are not allowed while code is running message.

Forcing you to stop debugging, edit, start debugging again. Then here’s a solution:

1. Stop running your app.
2. Go to Tools > Options > Debugging > Edit and Continue
3. Disable “Enable Edit and Continue”.

If you find that Visual Studio doesn’t alert you that files have changed and that confuses you when debugging do this:

1. Go to Tools > Options > Debugging
2. Enable “Require source files to exactly match the original version”.

Now run your application again and feel free to edit while you run the application, you will have to rebuild it in case you want to check the code though.

29 thoughts on “How to fix error “Changes are not allowed while code is running” in .Net

Leave a Reply

Close Bitnami banner
Bitnami