Everything SharePoint/Silverlight/WP7

My continuous learning of SharePoint, Silverlight, WP7 Development, Office, VSTO, C#…

Part 4: Create Solution Project

Posted by Steve Pietrek on June 6, 2007

This is Part 4 of a series on creating web parts and deploying them to SharePoint using a VS 2005 Solution Project. There are 6 parts in the series.


1. Although there are numerous ways to deploy a Web Part to SharePoint, I am going to discuss creating a Solution Package. The solution file will make it available for deployment through the Central Administration web site. You will be able to deploy the solution to multiple web applications from a single location.
2. The solution package is a cabinet file that contains the web part assembly and manifest file. This information will be used to place the web part assembly in the SharePoint site’s virtual directory’s bin folder and update the web.config appropriately.
3. Select File>Add>New Project
4. In the Add New Project dialog, under the Other Project Types folder, select the Setup and Deployment project type
5. Under Templates, select the CAB Project template, name it HelloWorld.Solution, and click OK
6. Right-click the HelloWorld.Solution project and select Add>Project Output
7. In the Add Project Output Group dialog, select the HelloWorldWebPart project from the drop down list
8. In the project list box, select Primary Output
9. In the Configuration drop down list, select (Active)
10. Click OK
11. Right-click the HelloWorld.Solution project and select Add>Project Output
12. In the Add Project Output Group dialog, select the HelloWorldWebPart project from the drop down list
13. In the project list box, select Content Files. This will include the manifest.xml file in the solution.
14. In the Configuration drop down list, select (Active)
15. Click OK
16. Build the HelloWorld.Solution project
17. The build will create a HelloWorld.Solution.CAB file. In order to add the solution, it must be a wsp file. Therefore, copy the HelloWorld.Solution.CAB file to HelloWorld.Solution.wsp. Note: If the solution extension is all caps, you will receive the error: “… unsupported extension..”. Replace WSP with wsp and things should work.

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

Gravatar
WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

 
Follow

Get every new post delivered to your Inbox.