可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
I'm having some problems with Edit and Continue when using Visual Studio 2010 on a Windows 7 64 bit machine. I've ensured the following
- Edit and Continue is enabled under Tools>Options>Debugging>Edit and Continue
- My solution platform is set to x86
- My solution configuration is set to Debug
- All my projects are building for Debug and x86
- For all projects under Projects>Properties>Build the Optimize code is unchecked
When I hit a break point and try to edit I and confronted with the following message.
Changes are not allowed in the following cases http://sedotech.com/Content/images/edit-and-continue.png
This is happening for me for all projects that I create whether they are WPF/Win Forms/VB.NET/C#/.NET 4/.NET 3.
Any ideas?
回答1:
OK guys I figured it out. The other night I was playing around with IntelliTrace and changed the setting to collect call information. I didn't notice the warning on that page stating "Edit and continue is disabled when collecting Call Information"! See screen shot.
IntelliTrace settings http://sedotech.com/Content/Images/edit-and-continue2.png
So I just disabled that and I was good to go. Thanks, that was really annoying.
回答2:
Another solution is to check if any 3rd party references included and check their options for: Embed Interop Types. Set it to False.
回答3:
One more option to check to enable the Edit and Continue Option.
Go to Project Properties and check the "Enable Edit and continue" Option
回答4:
I found the problem!
In Advance Compile Option (in Project Properties) Uncheck Enable Optizimations
回答5:
I had that also solved it by noticing that solution configuration was on release and not debug.
Changed it to debug and now I can edit and continue.
回答6:
mine was working after i have done following
under advanced compile options set target CPU to x86 (was set to any cpu)
and its working fine now.
回答7:
If you want to edit code after compile.
Just compile with ctrl + F5
回答8:
another reason
1-Right click on Project file then Properties.
2-Compile --> advanced compile options.
3-Choose to generate "full" instead of "pdb-only" debug info.
回答9:
At the msdn site,
http://msdn.microsoft.com/en-us/library/dd264944(v=vs.100).aspx
You can read about it:
"However, collecting calls and parameters will increase performance overhead, use additional disk space, and disable the Edit and Continue feature of the Visual Studio debugger."
回答10:
Under Visual Studio 2013 edit and continue now works for the x64 platform.
回答11:
Under Code Generation section, make sure option "Enable Function-Level linking" is set to Yes (/Gy).
回答12:
I had that also solved it by noticing that solution configuration was on AnyCPU debug and Project was x86 debug
Changed it to x86 and now I can edit and continue.
回答13:
I have a solution for a unique situation.
My Edit and Continue started failing in one function in VS2013. I discovered it was because I was doing some Office Interop to Excel in that function. I moved the Interop code to its own function and Edit and Continue started working in the original function again.