Building and Debugging SharePoint Solutions

In general, building and debugging SharePoint solutions is the same as building and debugging other types of projects in Visual Studio. The topics in this section explain the differences that do exist.

Building SharePoint solutions creates assemblies and a solution package (.wsp) file. The following table shows the locations of these files during a build.

Build item

Output folder

Assembly, program database (PDB), and .wsp files.

ProjectName\bin\debug or ProjectName\bin\release

SharePoint project item files.

ProjectName\pkg\debug or ProjectName\pkg\release

Build intermediate files.

ProjectName\obj\debug or ProjectName\obj\release

Package intermediate files.

ProjectName\pkgobj\debug or ProjectName\pkgobj\release

To build SharePoint solutions, the development computer must have the correct version of SharePoint server installed. Otherwise, building SharePoint solutions is the same as building other types of projects in Visual Studio. For more information, see How to: Build SharePoint Solutions.

Before debugging, Visual Studio copies the .wsp package to the SharePoint server, activates the Site and Web-scoped Features, and in some cases, starts the project. In other cases, you may have to open the project manually. For more information, see Troubleshooting SharePoint Solutions and Debugging SharePoint Solutions.

Visual Studio ALM features such as unit testing and IntelliTrace enable you to more accurately pinpoint problems in your SharePoint solutions. Profiling enables you to locate and identify performance problem areas in your SharePoint solutions. For more information, see Verifying and Debugging SharePoint Code and Profiling the Performance of SharePoint Applications.

To package or deploy SharePoint solutions, Visual Studio must have permission to copy files to the SharePoint server. You must run Visual Studio as an elevated process, and your user account must be a Site Collections Administrator on the SharePoint server. In addition, you must specify whether your project is a sandboxed solution or a farm solution. For more information, see Differences Between Sandboxed and Farm Solutions.

When a SharePoint solution is installed on a SharePoint server for debugging, the Clean command does not uninstall the solution. Instead, you must deactivate the Features through the SharePoint configuration.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft