“Cannot evaluate expression because the code of the current method is optimized” in Visual Studio 2010

后端 未结 22 674
耶瑟儿~
耶瑟儿~ 2020-12-23 08:59

I am using Visual Studio 2010 in debug mode and I have \"optimize code\" unchecked. I can\'t quick watch (or hover on) any variable in the debugger. I get this error \"Canno

22条回答
  •  庸人自扰
    2020-12-23 09:21

    I started receiving this message when I migrated to Visual Studio 2017. None of the ideas on this page that I tried worked for me. On another post I found this suggestion and it DID work - remove:

    [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
    

    ...from your AssemblyInfo file.

提交回复
热议问题