编辑和继续不起作用 [英] Edit & Continue doesn't work

查看:113
本文介绍了编辑和继续不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正试图获得受管理的Edit&继续工作(在Visual Studio 2015 v14.0.25425.01更新3中),这给了我一个可怕的对话框,"在以下情况下不允许更改:"

I'm trying to get managed Edit & Continue working (in Visual Studio 2015 v14.0.25425.01 update 3) and it's giving me the dreaded dialog, "Changes are not allowed in the following cases:"

  • 附加到不支持编辑并继续附加"的进程.

  • Attached to a process that does not support Edit and Continue on attach.

  1. 我正在Windows 10.0.10586 x64上使用IISExpress v10.0.14358.1000.
  2. 我在工具"->选项"中选中了为网站和项目使用IIS Express的64位版本". (尽管我在使用32位iisexpress时也遇到了相同的错误)
  3. 我所有的代码都被编译为任何CPU"

  • 正在调试的代码已优化

  • The code being debugged was optimized

    1. 不是,所有代码都是使用DEBUG常量集构建的,并且没有优化.

  • 正在调试的程序集以与域无关的方式加载

  • The assembly being debugged is loaded as domain-neutral

    1. 不是,我用Process Explorer检查过,程序集没有加载DomainNeutral.

  • 正在调试的程序集是通过反射加载的.

  • The assembly being debugged was loaded through reflection.

    1. 对此不确定,但是它是常规的ASP.NET MVC 5应用程序.

  • Intellitrace事件和呼叫信息已启用.

  • Intellitrace events and call information is enabled.

    1. 不会,在工具->选项->智能跟踪中禁用了智能跟踪.

  • 正在运行该程序的.NET Runtime不支持编辑并继续.

  • The .NET Runtime this program is running on does not support edit and continue.

    1. 不确定.它是针对".NET Framework 4.6.1"构建的,并且第一个符号加载为'iisexpress.exe"(CLR v4.0.30319:DefaultDomain):已加载"C:\ WINDOWS \ Microsoft.Net \ assembly \ GAC_64 \ mscorlib \ v4.0_4.0.0.0__b77a5c561934e089 \ mscorlib.dll'"

  • 其他一些事情:

    • 在"Web"项目设置中,同时选择"ASP.NET"和启用编辑&设置了继续"复选框(没有其他复选框).
    • 我在调试器设置中启用了编辑并继续".
    • 我在调试器设置中禁用了兼容模式.
    • 我尝试删除.suo文件和.vs目录,清理临时目录,进行完全重建

    我还能尝试什么?

    PS.如果VS调试器团队中的任何人正在阅读此书,我可以帮个忙吗?请杀死该对话框,并用表明问题的实际原因替换它.您在那里有调试对象,并且找到了解决方案,可以确定是哪个导致了问题,并且您可以单击一个按钮来解决问题.

    PS. if anyone on the VS debugger team is reading this, can i ask a favor? please kill this dialog and replace it with something that indicates the actual cause of the problem. You have the debuggee right there, and the solution, you can determine which of these is causing the problem and you can have a button which fixes the problem with a single click.

    推荐答案

    好,后代.原来,问题是由环境变量引起的(大概是在某个时候由事件探查器配置的):

    ok, for posterity. it turns out that the problem was caused by an environment variable (which presumably was configured by the profiler at some point):

    COR_ENABLE_PROFILING=1

    COR_ENABLE_PROFILING=1

    删除此修复程序可修改&继续.

    removing this fixes edit & continue.

    如果错误弹出窗口可以提及这一点,甚至检测到它并为您提供修复选项的选项,那将是很好的选择.

    it would be great if the error popup could mention this, or even detect it and give you an option to fix it for you...

    这篇关于编辑和继续不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

    查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆