开发者

Debug a custom solution for Sharepoint 2010 in visual studio

开发者 https://www.devze.com 2023-02-03 19:12 出处:网络
I built the WSP file manually (using CAB utility) and uploaded them to the sharepoint 2010 server. I want to debug the dll that was packaged in that WSP file to test if the events are caught by the li

I built the WSP file manually (using CAB utility) and uploaded them to the sharepoint 2010 server. I want to debug the dll that was packaged in that WSP file to test if the events are caught by the listener. I attached to w3wp.exe (all instances that appears). however I find that the symbols are not loaded for any break point to开发者_如何学运维 be hit and the thread is getting exited with some run time exception.

what Am I missing here ? Do I have to copy my PDB files at any particular location ?

thanks


you have the answer in your question. yes you have to upload your pdb file to GAC using command prompt and copy statement which would be available under C:\WINDOWS\assembly\GAC_MSIL> in directory form open it and copy your pdb thier

or easier option is compile your wsp in debug format


You don't need to copy the PDB symbols file into the GAC if Visual Studio is configured correctly :-

Fortunately, it's just as easy to debug in the GAC as it is in BIN if you configure the development environment correctly.

Unfortunately, few know how to do this because the internet is polluted with pages full of bad information that is a held over from previous versions of .Net.

You can spot these easily because they will say you need to copy the debug symbols (.pdb file) to the GAC. In and of itself, that will not work. These days it is also completely unnecessary.

To configure VS ... to debug the assemblies properly, do the following:


You mention the Sandbox tag in your question, so you have to attach to SPUCWorkerProcess.exe and not w3wp.exe, the sandbox code runs in an isolated worker.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号