Edit and continue feature stopped working in Visual Studio 2010

后端 未结 22 1791
南旧
南旧 2020-12-05 06:43

The Visual Studio Edit and Continue feature stopped on Visual Studio 2010, and I don\'t know what has caused the problem.

I am working on a Windows application progr

相关标签:
22条回答
  • 2020-12-05 07:06

    In the Solution Explorer view, right-click on each reference of References, choose Properties. In the Properties view, sign False to the field of Embed Interop Types. This works for me.

    0 讨论(0)
  • 2020-12-05 07:06

    Removing the * from the assembly versions of my referenced projects solved the issue for me.

    From Github:

    "I reproduced this issue on a mix of VB and C# projects with [assembly: AssemblyVersion(1.2.3.*")]. Once a VB project references a C# project with this setting things start collapsing. It looks like it has the same problem the other way around." -rhuijben

    https://github.com/dotnet/roslyn/issues/28224

    (At risk of being flagged, seems we have been suffering from VS Edit and Continue issues for over a decade. It's shocking to me that the Microsoft Visual Studio team hasn't cared enough to help developers by providing more verbose info when this occurs)

    0 讨论(0)
  • 2020-12-05 07:08

    Reading the above, my UI project has Shell32 with "Embed Interop Types" == true. I changed it to false, and "edit and continue" started working.

    0 讨论(0)
  • 2020-12-05 07:08

    For who still gets this error even with Visual Studio 2017

    No dynamic/Portable Class Libraries/Nuget packages or dependancy problems. No errors or warning highlighted by Visual Studio.

    After hours spent trying all the solutions posted in this and other threads and webpages, the only solution that worked for me was to check-in, remove the Workspace and Map&Get again.

    To remove the Workspace, Source controlAdvancedWorkspaceRemove.

    I'm using Visual Studio 2017 Community up to date and after a relatively fresh install on a new machine (one week and few work hours).


    Methods I've tested with no success prior to the solution above

    • Made sure Edit & Continue was enabled in Visual Studio options. Untick and tick it back again
    • Deleting bin and obj for all project in solution
    • Clean and Rebuild all, restart VS / reboot in combination to the above
    • Checking compile options and Nuget packages and dll compatibility for the projects, inspired by this
    • Unloading the projects in various combinations to test dependancy problems or other issues (inspired by this)
    • Deleting solution an re-downloading it (without removing the Workspace)
    • Sign False to Embed Interop Types
    • Set <_ResolveReferenceDependencies> to true as explained here
    • Combinations of the above with restart of VS and reboots

    After this, I made a check-in and downloaded the Solution on another machine running the same version of Visual Studio (2017 Community). As I didn't get the Edit&Continue issue there, I went for the Workspace removal.

    0 讨论(0)
  • 2020-12-05 07:11

    In my situation, someone added a Reference to the Project's output into the Reference list: in Solution Explorer look under [ProjectName]\References for [ProjectName*] and remove it.

    If the project is relying on code from a copy of itself, you can't 'Edit and Continue'. In the warning list you may or may not (more likely to in a larger project) have 'conflicts with imported type' messages if this is the cause of the problem.

    0 讨论(0)
  • 2020-12-05 07:11

    In VS2013 I had to enable "Use Managed Compatibility Mode" in the debugging options. I think it is because I have a .Net 4 project referencing a .Net 2 assembly.

    For another project in the same solution I had to uncheck "Define TRACE constant" in the project properties.

    0 讨论(0)
提交回复
热议问题