Udostępnij za pośrednictwem


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.

Project Output for SharePoint Solutions

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

Building SharePoint Solutions

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.

Debugging and Testing 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.

Security During the Build Process

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.

Using the Clean Command

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.

See Also

Other Resources

Developing SharePoint Solutions

Browsing SharePoint Connections Using Server Explorer

Packaging and Deploying SharePoint Solutions