visual-studio 以下模块是在启用优化或没有调试信息的情况下构建的
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/810203/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
The Following Module was built either with optimizations enabled or without debug information
提问by 500 - Internal Server Error
I cannot get rid of this in my VS 2008 web project when debugging. I've checked that it's in debug mode on the non-web project in question and it's in Active(Debug). Deleted all items in my .NET 2.0 temp folder in Windows. Not sure what else to do here.
调试时我无法在我的 VS 2008 web 项目中摆脱这个。我已经检查过它在有问题的非 Web 项目上是否处于调试模式,并且它处于活动(调试)状态。删除了 Windows 中我的 .NET 2.0 临时文件夹中的所有项目。不知道在这里还能做什么。
回答by 500 - Internal Server Error
Try disabling "Enable Just My Code" in Tools/Options/Debugging/Options.
尝试在工具/选项/调试/选项中禁用“仅启用我的代码”。
回答by Geert
I had the same problem and discovered that I wasn't outputting my debug info on my build. If you right click on the project and go to 'properties', then select the 'build' tab, on the bottom of the page there's an 'Advanced...' button that will display your setting for you output debug info. Set that to 'full' and the error should go away.
我遇到了同样的问题,发现我没有在构建中输出调试信息。如果您右键单击项目并转到“属性”,然后选择“构建”选项卡,在页面底部有一个“高级...”按钮,它将显示您的设置,用于输出调试信息。将其设置为“完整”,错误就会消失。


回答by Gustavo Mori
I just ran into this issue, and quickly decided that the other answers posted didn't apply to me.
我刚遇到这个问题,并很快决定发布的其他答案不适用于我。


I'm the owner of the project, and I know it was built with debug information, as well as without optimizations. Furthermore, I'm never happy choosing the disabling of a warning as my first choice. Hiding/ignoring this warning could become an issue in a future debugging session.
我是该项目的所有者,我知道它是使用调试信息构建的,并且没有进行优化。此外,我从不喜欢选择禁用警告作为我的第一选择。隐藏/忽略此警告可能会成为未来调试会话中的问题。
Since this only started occurring after I signed the assembly, this clued me in on my quick fix: temporarily remove the strong name of my DLL (and consuming EXE). Voila! Problem solved.
由于这只是在我签署程序集后才开始发生,这让我知道了我的快速修复:暂时删除我的 DLL 的强名称(并使用 EXE)。瞧!问题解决了。
A better, long-term solution, could take the form of adding a post-build action to update the GACso it has the latest version of the signed DLL.
一个更好的长期解决方案可以采取以下形式:添加构建后操作来更新GAC,使其拥有最新版本的签名 DLL。
But for now, I'm happy to move on from this diversion, and continue working on the issue that brought me to this debugging session.
但就目前而言,我很高兴从这种转移中继续前进,并继续解决将我带到此调试会话的问题。
回答by Gustavo Mori
resolved. Deleted all occurences (all projects) of the dll in question.
解决。删除了有问题的 dll 的所有出现(所有项目)。
回答by user2892396
VS2012, clean and rebuild fixed the issue for me. "Properties" -> "Build" -> Optimize code is unchecked. "Properties" -> "Build" -> "Advanced" -> Debug Info: Full
VS2012,清理和重建为我解决了这个问题。“属性”->“构建”-> 优化代码未选中。“属性”->“构建”->“高级”->调试信息:完整
回答by raksham
Check out this link
看看这个链接
http://social.msdn.microsoft.com/Forums/en-US/vsdebug/thread/43cb16ba-0759-42ab-8e7d-9f168ace3b6f
http://social.msdn.microsoft.com/Forums/en-US/vsdebug/thread/43cb16ba-0759-42ab-8e7d-9f168ace3b6f
try unchecking "Just My Code" in Tools->Options->Debugging->General.
尝试在工具->选项->调试->常规中取消选中“仅我的代码”。
it works for me
这个对我有用
回答by Nemo
Guessing VS 2008 is not rebuilding the dll correctly.
猜测 VS 2008 没有正确重建 dll。
1) Delete all occurrences of the dll
1)删除所有出现的dll
2) Rebuild solution
2) 重建解决方案
And that should fix it.
这应该解决它。
回答by lc.
Check your build configuration options. Make sure optimizations are turned off and the DEBUG constant is defined.
检查您的构建配置选项。确保优化已关闭并定义了 DEBUG 常量。
回答by Sam Neirinck
If everything else fails, try renaming the Assembly name in the project's properties. This fixed the issue for me.
如果其他一切都失败了,请尝试在项目的属性中重命名程序集名称。这为我解决了这个问题。
回答by Dave
I get this issue as well, for some reason it's happened 3 or 4 times; I think it must be a Visual Studio 2005 bug/hick up (or at least my installation).
我也遇到了这个问题,出于某种原因,它发生了 3 到 4 次;我认为它一定是 Visual Studio 2005 的错误/故障(或至少是我的安装)。
This has worked every time: to fix it I
这每次都有效:修复它我
- Right click on my solution and click Properties.
- Open Configuration Manager.
- Select Debug in the drop down menu (if not already selected).
- Uncheck BUILD. Then re-check it.
- Rebuild the solution.
- 右键单击我的解决方案,然后单击属性。
- 打开配置管理器。
- 在下拉菜单中选择调试(如果尚未选择)。
- 取消选中构建。然后再检查一下。
- 重建解决方案。

