Geeks With Blogs

Fringe SharePoint Continued

I recently did some training for a client and one of the topics that came up was upgrading existing 2007 code to SharePoint 2010 Projects. I just wanted to share some of the issues that came up and the discussion that might be usefull to others.

If you developed customizations for SharePoint 2007 you either Visual Studio 2005/2008 VSeWSS 1.1/1.2/1.3   or you used WSPBuilder. A lot of fellow SharePoint MVP's and experienced SharePoint Developers used WSPBuilder. I personally prefered it over the VSeWSS for the flexabilty I had to deploy and build SP Projects. Well the problem that you face now whichever route and tool you took to develop, is how to upgrade those projects.

The following describes the Visual Studio Evolution and the SharePoint extensions. The Isue we face now is that VS2010 does not need any extra extensions for ShrePoint Projects. So we can't just upgrade the project and expect it to work in VS 2010 as the project templates that were part of the VSeWSS 1.1/1.2/1.3 are not part of the VS2010 product.

 

WSPBuilder Project Upgrades

  I must admit I have yet to really explore upgrading WSPBuilder projects but there is a VS2010 plugin if you still prefer to use WSBuilder for developing SharePoint 2010 customizations and if you want to use VS2010 to develop SharePoint 2007 customizations. You can find it on Codeplex. Unfortunately it appears it is still in beta and it has been for some time now. This topic is just out of scope for this post. When I dig into this I could post something, as it appears there is not much out there on this area.


VSeWSS project Upgrades

 I looked at upgrading options that are available with VSeWSS and you really have 1 with Visual Studio but you can download an extension for a second option. I will discuss the difference now.

  Visual Studio 2010 includes a Project Template "", that will import a WSP and bring it into visual studio. The obvious advantage to this is that you can take any WSP and bring in the contents into VS2010. I was fully expecting it to work and it does but...all it does is import the contents...the CONTENTS I thought it would magically turn a "DLL" and setup all the source code in the project. But what you get is this:

This is an example of a trial web part project that was put together in VS2008 with VSeWSS 1.3. There are some recognizable issues here. First, there is no source code! it simply has a dll that is now one of the items in the my SharePoint Project. And also the Webpart  xml and .webpart file are included as a Module. So the webpart isn't really treated as a webpart, but simply as files to upload to the target environment.  This kind of misses the mark.

 

The second option you have is to import the VSeWSS project but it is an extra download you can find it here. It will install an extra template in Visual Studio 2010 that will look like this:

With this download you will be able to import your VS2008 Project and import it into VS2010. This is not an import of a WSP it is an upgrade of the project. So you will see the source code and the artificats included. There is still a bit of re-working you have to perform to get it to look like any SharePoint 2010 Project but you are better off with this import than you were with the WSP import. To be fair, I don't think the WSP Import was really meant for upgrades.

The one issue that sparked this entire blog post was that during the Import of the VSeWSS project we faced an issue and it stemmed from this screen:

When you import the VSeWSS you will get to this screen. This will configure your artifacts to be deployed to the above location. It is important that this be the ROOT site collection. What we had was a site collection outside of the root and on top of that, NO root site. This import produced an error, "URL cannot be Null" and we couldn't figure out why. Becasue the documentation that came with the extra download had screenshots and examples of the root site configured as part of the above screen, so we made the appropriate changes to have the root, IT WORKED!!!

So in all, there are some options for you. This ultimatley is not super detailed it is meant to give you some background and some high level information about some issues and also some quick direction and download links. Hope it helps.

Posted on Tuesday, March 29, 2011 8:48 PM SharePoint , Development , Web Parts | Back to top


Comments on this post: Upgrading SharePoint 2007 Projects to SharePoint 2010

No comments posted yet.
Your comment:
 (will show your gravatar)


Copyright © juanlarios | Powered by: GeeksWithBlogs.net