I am wanting to create a wsp
from my solution but I am wondering which one I turn into the wsp
, the .sln
or the .csproj
?
4 Answers
Open solution in Visual Studio.
Right click on the solution and deploy or build the solution.
Now check your solution configuration
If your are in debug mode, then find your .wsp
in the following folder
PathOfYourSolution\bin\Debug
If your are in release mode, then find your .wsp
in the following folder
PathOfYourSolution\bin\Release
You can have multiple SharePoint projects (.csproj) in the same Visual Studio solution (.sln). Each SharePoint project builds into a WSP (right-click on the project and select "Package" or "Publish" depending on your version of VS). "Package" (or "Publish") will first build the project and then create the .wsp.
A Visual Studio Solution (.sln) is not at all mapped to the SharePoint solution (.wsp) concept!
You can't turn .sln into a WSP. A .csproj created using appropriate SharePoint project template is turned into a WSP when you choose to deploy.
I think you'll find this video valuable. In it I describe what a Solution Package (WSP) is and how to create and deploy one. Although the video was recorded for SharePoint 2010, the material applies to SharePoint 2013 and 2016.