2011-06-06 90 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)"