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

后端 未结 22 676
耶瑟儿~
耶瑟儿~ 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:25

    I had the same problem while debugging a class library from a testbed web app. I was referencing the release version in the testbed and that was set to be optimised in the class library properties.

    Un-ticking the optimise code checkbox for the release version in the class library properties, just while I am writing it, has solved the issue.

提交回复
热议问题