【问题标题】:Windows service debugging errorWindows服务调试错误
【发布时间】:2011-06-06 15:33:17
【问题描述】:

当我尝试做工具时-> 附加到进程并选择我得到的 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   

当我执行以下操作时:

Tools -> options -> Debugging 并取消选中“Warn if no user code on launch”,错误消失但调试器点未命中。请提出解决方案。

谢谢

【问题讨论】:

  • 您确定库是在调试模式而不是发布模式下编译的吗?此时您所做的只是抑制错误消息(有点毫无意义)。
  • @Joel 我如何检查库是否在调试模式下编译,如果不是如何设置它。之后我需要重建吗?
  • 在项目的属性中(windows服务和任何正在运行的dll项目),您需要转到Build选项卡并在配置选择下选择Debug顶部。
  • @Joel:我已经这样做了,但仍然是同样的错误。

标签: c# visual-studio-2010 windows-services


【解决方案1】:

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

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2011-02-07
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-07-06
    相关资源
    最近更新 更多