如何将 SharePoint 2010 解决方案 (WSP) 部署到 SharePoint 2007

发布于 2024-09-28 12:42:42 字数 500 浏览 5 评论 0原文

您好,我知道这有点讽刺,但我这里有一个简单的场景,我们使用 VS 2010 为 SharePoint 2010 开发了一个可视化 Web 部件;它非常好且顺利,所以我们决定将其包含在我们的一个旧项目中。

我(作为开发人员)想到的第一个场景是将代码文件从 VS 2010 解决方案复制到 VS 2008 解决方案,使用 VSeWSS 准备一个新的 WSP 并部署它。 但后来我认为只部署当前的 WSP 可能是可行的;但不幸的是这不起作用,并抛出以下错误。

解决方案的解决方案清单 'bac64dd2-95ab-4f22-a4a9-99499652688d' 验证失败,文件manifest.xml, 第 2 行,字符 110: “SharePointProductVersion”属性 没有声明。 SPCurrentWebTreeViewWP.wsp: 解决方案安装失败。

您建议什么好方法,是复制粘贴吗?或使用 Manifest.xml ..谢谢或帮助

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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

定格我的天空 2024-10-05 12:42:42

你真的不能那样做。这两个版本之间的变化太多,无法将 SharePoint 2010 Visual WebPaprt 移植到 SharePoint 2007 中。相反的情况会简单得多。

我建议开始查看 SmartPart (http://smartpart.codeplex.com/),这是 2007 年您将获得的最接近 Visual Webpart 的东西。

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.

め可乐爱微笑 2024-10-05 12:42:42

如果不查看代码,就不可能判断您构建的 Web 部件实际上是否与 SharePoint 2007 兼容。这完全取决于您是否使用特定于 SharePoint 2010 的任何内容。

也就是说,从技术上讲,没有什么可以阻止使用 Visual Studio 2010 构建的可视 Web 部件在 SharePoint 2007 下正常运行。 ://stackoverflow.com/users/769779/niels-gjeding-olsen">Niels在他的回答,有在 VS2010 下构建 2007 解决方案的教程。请务必检查一下。

您的具体错误存在于清单文件本身中,要更正此错误,您需要从包中删除 SharePointProductVersion 属性。为此,请打开“解决方案资源管理器”下的Package.package 文件。在“属性”窗格中,找到 SharePoint 产品版本 设置并清除该值(它将设置为 14.0)。这应该删除底层清单文件中的属性。重建并重新打包您的解决方案,然后再次尝试部署。

就像我说的,不能保证它会起作用,但它应该可以帮助你克服当前的错误。

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.

此生挚爱伱 2024-10-05 12:42:42

错误非常明显,wsp 中的清单文件不同,我建议在 vs2008 中构建它并仅使用相同的代码块。 (假设您使用的代码可以在 2007 年运行)

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)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文