Reputation: 15643
I'm a C# programmer and recently I've installed Visual Studio 2013. The problem is when i set a break point or get an error and trying to edit the codes while debugging I get this error and I couldn't find the same error searching on Google.
Changes are not allowed for this module as it was not built for changes while debugging or the target .NET runtime version does not support it
I also tried to check the options on Tools -> Options -> Debugging -> Edit and Continue
, But didn't help.
Any idea what the problem is?
Upvotes: 10
Views: 5742
Reputation: 219
It worked for me by unchecking "Enable optimizations" option.
Please refer below image for more info.
Upvotes: 0
Reputation: 1462
In a Web Forms application, I initially received the "Changes are not allowed for this module as it was not built for changes while debugging or the target .NET runtime version does not support it" error message. Based on suggestions above I completed the following:
I tried to modify code, but then I received the "Edit and Continue" window stating "Changes are not allowed while code is running."
Here was the important part: I can only make changes while stopped at a breakpoint. If the page is loaded, I get that same "Changes are not allowed..." message. So set a breakpoint to a line above where you need to make the change, complete the update and you should be set.
Or (as I subsequently discovered) another way to modify code without using a breakpoint is to click in Visual Studio "Debug/Break All" (Ctrl+Alt+Break), make your change and then press F5 or click the "Continue" button. (Using this method you will might need a page refresh to see the mods.)
Upvotes: 0
Reputation: 1
I just had the same problem and found a solution that worked for me right here after trying 100 other things:
https://stackoverflow.com/a/12543388/5367013
1.) execute VsPerfCLREnv /globaloff 2.) reboot your computer
Upvotes: 0
Reputation: 1507
I came across the same issue and found that "solution configuration" on the top bar was changed to Release from Debug,because I build the last version into Release folder.Changing back to Debug mode will solve the issue.
Upvotes: 3
Reputation: 1628
You can try
Upvotes: 0
Reputation: 19712
To edit a C# program while you're running it in Visual Studio 2013:
Upvotes: 10
Reputation:
We just had the same issue in Visual Studio 2013 and in our case it was because we had disabled the Visual Studio Hosting Process on the Debug tab in Project Settings.
Upvotes: 0