为调试而优化的模块-无法优化表达式,因为当前方法的代码已优化. [英] Modules optmised for debugging - Cannot evaluate expression because the code of the current method is optimized.
问题描述
为调试而优化的模块
我已经对此进行了一些搜索.但是无法解决我的问题.
I have done some search on this. However couldnt solve my issue.
我有一个名为dll MyTest.dll的Web项目
I have a web project that calls a dll MyTest.dll
我的web.config的调试设置为true
,并且Mytest.dll没有使用针对调试/任何版本的优化代码构建
my web.config has debug set to true
and Mytest.dll is not build with optimise code for debug/any version
仍然,当我开始调试时,模块"窗口显示Dll已优化,并且无法调试代码.
在dll方法中调用的行很少被跳过.
Still, When I start debugging, modules window shows Dll as optimised and I cant debug into the code.
Few of the lines called in the dll methods are skipped.
这是在几个变量上显示的内容:无法评估表达式,因为当前方法的代码已优化.
我如何将其设置为优化-不?"
This is what is shown on few variables: Cannot evaluate expression because the code of the current method is optimized.
How can I set it Optimised - no?
谢谢
推荐答案
你好,
这是什么类型的dll,是托管还是非托管?
在Visual Studio中,如果我们的dll是通过ClassLibrary项目中的托管代码(使用C#或VB.NET)进行编码的,则可以右键单击项目名称,然后选择构建"选项卡,然后取消选中优化代码"选项以取消优化代码.
What kind of dll it is, I mean, is it managed or unmanaged?
In Visual Studio, if our dll is managed coded (using C# or VB.NET) in a ClassLibrary project, we could right click the project name and choose Build tab then uncheck the Optimize code option to unoptimize code.
最好的问候
这篇关于为调试而优化的模块-无法优化表达式,因为当前方法的代码已优化.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!