在SharePoint中调试自定义计时器作业 [英] Debugging a custom timer job in SharePoint
问题描述
要在visual studio中调试自定义计时器作业,我无法打到调试器。
To debug a custom timer job in visual studio, I wasn't able to hit the debugger.
是否需要添加.PDB文件到GAC?
我尝试过上述操作,但不允许拖放此特定文件。
I tried doing the above, but it's not allowing to drag and drop this particular file.
为什么需要添加此文件?
Why do we need to add this file?
推荐答案
拖放在程序集文件夹中不起作用,因为的shell窗口浏览器附加到它。你可以做3件事来绕过这个shell -
Drag and drop does not work in the assembly folder because of the shell windows explorer attaches to it. You can do 3 things to bypass this shell -
-
通过cmd在C:\windows\中复制.pdb文件assemblyGAC_MSIL\yourassembly\yourassemblyversion\
Copy the .pdb file via cmd in C:\windows\assemblyGAC_MSIL\yourassembly\yourassemblyversion\
使用 gacutil.exe
将程序集文件夹映射为网络驱动器\server\c $ \windows\assembly,然后像通常那样复制.pdb
Map the assembly folder as Network-Drive \server\c$\windows\assembly and then copy the .pdb just as you normally would
这里是关于调试计时器作业的好文章。它是针对SP2007编写的,但应适用于SP2010。
Here is a good article about debugging timer jobs. It's written for SP2007 but should apply to SP2010 aswell.
这篇关于在SharePoint中调试自定义计时器作业的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!