0
votes

Hi i know its a bit sarcastic but i have a simple scenario here, we worked on a visual web part for SharePoint 2010 using VS 2010; it was nice and smooth so we decided to include it on one of our old projects.

First scenario came to my mind (as a developer) to Copy code files from VS 2010 solution to VS 2008 solution, using VSeWSS prepare a new WSP and deploy it. But later i thought it might be doable to just deploy the current WSP; but unfortunately this is not working, and throwing the below error.

Solution manifest for solution 'bac64dd2-95ab-4f22-a4a9-99499652688d' failed val idation, file manifest.xml, line 2, character 110: The 'SharePointProductVersion ' attribute is not declared. SPCurrentWebTreeViewWP.wsp: The Solution installation failed.

What do you suggest as good approach, is it copy and paste ? or play with the Manifest.xml .. Thanks or help

3

3 Answers

1
votes

You can't really do that. There is simply too much changes between the 2 versions to allow a SharePoint 2010 Visual WebPaprt into SharePoint 2007. The opposite would be a lot simpler.

I suggest to start looking at the SmartPart (http://smartpart.codeplex.com/), which is the closest thing you will get to the Visual Webpart in 2007.

1
votes

It's impossible to say whether or not the web part you built is actually compatible with SharePoint 2007 without seeing the code. It all depends on whether or not you're using anything that is specific to SharePoint 2010.

That said, there's technically nothing preventing a visual web part built with Visual Studio 2010 from running fine under SharePoint 2007. And as Niels points out in his answer, there are tutorials available for building 2007 solutions under VS2010. Be sure to check that out.

Your specific error is in the manifest file itself, and to correct this you need to remove the SharePointProductVersion attribute from the package. To do this, open the Package.package file under Solution Explorer. In the Properties pane, locate the SharePoint Product Version setting and clear the value (it will be set to 14.0). This should remove the attribute in the underlying manifest file. Rebuild and repackage your solution and try deploying again.

Like I said, no guarantees it will work, but it should get you past your current error.

0
votes

the error is pretty clear that the manifest files are different in the wsp, I would recommend building it in vs2008 and just use the same code blocks. (assuming you are using code that will work in 2007)