Visual studio 2013 + .Net 4.5.1 + Edit and continue 64 bit: not working

余生长醉 提交于 2019-11-30 12:53:17

问题


Supposedly vs 2013 added support for edit and continue 64 bit (see http://blogs.msdn.com/b/visualstudioalm/archive/2013/06/26/debugging-support-for-64-bit-edit-and-continue-in-visual-studio-2013.aspx).

However I can't get it working.

After going to the properties of my .net 4.5.1 asp.net mvc web application project, and checking the "Enable Edit and Continue" checkbox, I can now edit the code while on a breakpoint.

The problem is that after saving and trying to keep on stepping trough, I get an error dialog saying:

Edits were made which cannot be compiled. Execution cannot continue until compile errors are fixed

In the error list window, those 2 errors always show:

The type 'System.IEquatable`1' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.

The type 'System.ValueType' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.

It's really weird error message right? However insignificant my change is, I always get the same error.

note: I run windows 7 / vs 2013 ultimate and my project is set up to use IIS Express in the project properties.


回答1:


This is a known issue when referencing portable libraries and using Edit & Continue. We are looking to fix this in a future version of Visual Studio.

A workaround for now:

  1. Right-click on the project with the issue in Solution Explorer and choose Unload
  2. Right-click on the unloaded project and choose Edit
  3. Within the body of the first <PropertyGroup> element, add the following: <_ResolveReferenceDependencies>true</_ResolveReferenceDependencies>
  4. Reload the project saving changes

This should fix the build issue.

Note: Depending on the project, this might have a performance hit, not only during Edit & Continue usage, but just general usage within VS.




回答2:


In my case, the only solution that worked was to remove the workspace and map&get again.

To remove the workspace, Source controlAdvancedWorkspaceRemove.



来源:https://stackoverflow.com/questions/20324080/visual-studio-2013-net-4-5-1-edit-and-continue-64-bit-not-working

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!