Woman In Tech: NAVIGATING THE DIGITAL WORLD

seeker, learner, educator and paying it forward… in short – Jigyaasu

Debugging SharePoint web part(SmartTemplate)

Posted by

·

, , ,

After running around in circles for a day, finally figured out how to enable debugging in a SharePoint SmartPart web part project.

When using SharePoint smart part template, the DeploymentTarget is set to “WebApplication” in manifest.xml by default.

  • Modify WSPBuilder.exe.config file adding

    <add key=DeploymentTarget value=GAC />

    Setting the value as GAC (GlobalAssemblyCache) installs the assembly of the custom web part is in C:\WINDOWS\assembly folder automatically.

  • Change the Project Properties: ..\Inetpub\wwwroot\wss\VirtualDirectories\YourSharePointVirtualDirectory\bin\

Changing the output path as mentioned above adds the .dll and .pdb files to the specified web application.

  • Build the solution.
  • Refresh the SharePoint site that has the SmartPart.
  • Debug the solution and attach to process
  • Select the w3wp.exe process.
  • Determine if the selected process is correct by verifying the modules. CTRL + ALT + U will display all the modules. If your module is not listed try another w3wp.exe process.

By following the above steps, we can debug the solution. Once it is ready, change the output path to \bin\debug. Rebuild the solution again.

It is ready to be deployed!

Swetha Sankaran, Microsoft MVP(2017-2020) | Gen AI enthusiast Avatar

About the author

Hi! My name is Joan Smith, I’m a travel blogger from the UK and founder of Hevor. In this blog I share my adventures around the world and give you tips about hotels, restaurants, activities and destinations to visit. You can watch my videos or join my group tours that I organize to selected destinations. [Suggestion: You could use the Author Biography Block here]

Discover more from Woman In Tech: NAVIGATING THE DIGITAL WORLD

Subscribe now to keep reading and get access to the full archive.

Continue reading