解决方案重新部署后 Web 部件损坏
我已经在 Sharepoint 2010 服务器上部署并重新部署了 .wsp(该解决方案是在另一台 2010 服务器上开发的)。该解决方案包含 2 个 Web 部件。
撤回并删除旧解决方案后,我再次添加并部署相同的解决方案,没有出现任何错误。
之后,我停用并重新激活了通过 .wsp 文件安装的功能。
问题是,每当我尝试将这 2 个 Web 部件之一添加到页面时,我都会收到一条错误消息,提示“操作无法完成,因为该项目已从库中删除”。
你知道发生了什么吗?非常感谢阿努的帮助!
I have deployed and then redeployed a .wsp on a Sharepoint 2010 server (the solution was developed on another 2010 server). The solution contains 2 web parts.
After retracting and removing the old solution, I added and deployed the same solution again, with no errors.
Afterwards, I deactivated and reactivated the feature installed through my .wsp file.
The problem is that whenever I try to add one of those 2 web parts to a page, I get an error saying "The operation could not be completed because the item was removed from the gallery".
Do you have any ideea what's happening? Anu help is greatly appreciated!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
如果 Web 部件在 Web 部件库中被孤立,通常会发生这种情况。尝试停用您的解决方案并收回并卸载您的 wsp。然后检查 Web 部件库中的网站集。如果您仍然在那里看到 Web 部件,请手动删除它们。
然后您可以添加并部署您的 wsp 并激活您的解决方案。然后,Web 部件应可在 Web 部件库中使用,并且能够添加到您的页面中。
Usually this happens if the web part gets orphaned in the web part gallery. Try Deactivating your solution and Retract and Uninstall your wsp. Then check the Web Part Gallery for the site collection. If you still see your web parts there then manually delete them.
Then you can Add and Deploy your wsp and activate your solution. The web parts should then be available in the web part gallery and be able to be added to your pages.
我遇到了一个更简单的解决方案,对我来说效果很好。
转到网站设置/库/Web 部件中的 Web 部件库,并删除有问题的 Web 部件条目。然后停用并重新激活包含该 Web 部件的 wsp,一切都应该正常工作。无需重新部署或卸载。
来源
I came across a more simple solution which worked well for me.
Go to the webparts gallery at Site Settings/Galleries/Web parts and delete problematic webpart entry. Then deactivate and reactivate the wsp which contains that webpart and everything should work fine. No need for redeployment or uninstalling.
Source
我有同样的问题,但在我的情况下,在 Web 部件库中彻底搜索后发现一些具有相同名称但没有程序集前缀的 Web 部件已创建。
解决方案只需按日期对 Web 部件进行排序,您就会获得新的 Web 部件。
有时,一切都与以前相同,但 SharePoint 忘记了 webpart.xml 文件中的设置
I have the same issue, but in my case after a thorough search in web part gallery found out that some web parts having the same name, but without assembly's prefix have created.
The solution is just to sort the web parts with the date and you'll get the new web parts.
Some times it happens that every thing is same as before, but SharePoint forgets the settings which are placed in webpart.xml file