.netvisual-studiovisual-studio-2013edit-and-continue.net-4.5

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


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.


Solution

  • 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.