Saturday, January 23, 2010

Adding Assembies To SharePoint 2010 .WSP

I decided to commit most of my day today writing a series of web parts for SharePoint 2010 that would update Twitter in a variety of ways. The first web part I created did a direct update. The second one I did, wrote to a list and the list updated Twitter. I like the idea of the list update because now the Colorado SharePoint Users Group site (www.cospug.com) can now use workflows to update this list from our events calendar and announcements.

When I went to deploy the project on the server, I noticed that my TwitterAPI .dll was not included in the package. All of my SharePoint 2007 development used the WSP Builder utility that allowed you to create the package any way you wanted by using the 12 hive folder structure.

In 2010, using Visual Studio 2010, we don’t have that luxury. While most of the things I did today were fairly intuitive through the interface, packaging up the .dll files the way I wanted to took me a little longer that I had planned. I tried modifying the various manifest files that are in the project, but each of these are auto generated when you build the solution.

While I was meddling around, I started poking around the ‘Package’ folder and found that under the advanced options, I would add ‘Additional Assemblies’. Once I did that, the package was exactly the way I wanted it and I had a successful deployment.
I think I would still prefer the way WSPBuilder works, but I can’t complain much. My overall efforts in 2010 are far less than anything in 2007. Visual Studio 2010 and SharePoint 2010 make it fun to develop!!!

0 comments: