2011-06-06 87 views
2
当我尝试做工具 - >附加到进程,并选择窗口服务,我得到

Windows服务的调试错误

--------------------------- 
Microsoft Visual Studio 
--------------------------- 
The following module was built either with optimizations enabled or without debug information: 



C:\Program Files (x86)\MyProj\Service\myproj.dll 



To debug this module, change its project build configuration to Debug mode. To suppress this message, disable the 'Warn if no user code on launch' debugger option. 
--------------------------- 
OK 

当我以下:

工具 - >选项 - >调试并取消选中“在启动时没有用户代码时发出警告”,错误消失但调试点未命中。请建议解决方案。

感谢

+0

你确定该库在调试模式,而不是释放模式正在整理?你在这一点上所做的就是压制错误信息(有点毫无意义)。 – 2011-06-06 15:35:41

+0

@Joel如何检查库是否以调试模式编译,如果不是如何设置它。这之后我需要重建吗? – DotnetSparrow 2011-06-06 15:40:06

+0

在你的项目的属性(windows服务以及与之一起运行的任何dll项目)中,你需要转到'Build'选项卡并在顶部的配置选择下选择Debug。 – 2011-06-06 16:03:17

回答

1

"Tools--->Options---->Debugging"取消选中"Enable Just My Code(Managed Only)"