4

您如何处理现有 SharePoint 代码的改进和添加的功能?

您是否将原始代码部署为功能?
您是否创建了一个新的 feature_V2 并停用了原来的?

您发现哪些流程会导致未来出现问题?

我对 WebParts、EventHandlers 和 WorkFlows 特别感兴趣。

据我所知,MS 没有留下关于更新现有代码的“最佳实践”。(实际上,我不确定他们留下了“实践”,更不用说“最佳实践”了)

您可以查看有关此主题的其他问题:
how-to-upgrade-a-long-running-sharepoint-workflow-already-in-production
how-to-update-spitemeventreceiver-assembly-version-for-a-list-in- sharepoint
我应该在 1-1 比率中保留解决方案和功能

你的方法是什么?

我知道这个问题可能是主观的,但我觉得围绕 SharePoint 开发的这个领域存在很大的信息差距。

谢谢你,
基思

4

2 回答 2

3

We always deploy custom code as features and solutions. When it is time to upgrade the existing code, all you have to do is stsadm -upgradesolution and everything works very nicely. I do not like the idea of having feature_v2 type features around...it makes it extremely difficult to keep track of the current version. I think you should only have one version of each feature in your production environment.

Leave the version control to your source control system.

于 2009-01-03T02:35:03.920 回答
0

我在一家从事大量 SharePoint 开发的商店工作。您希望使用解决方案包按功能进行部署。您可以在进行过程中轻松升级您的功能,并且您需要升级解决方案包。可以使用WSPBuilder从 TFS 构建服务器创建此解决方案包。随着您的前进,唯一剩下的就是升级解决方案并“强制”重新激活您的功能以拥有该功能的新功能。

不要忘记对通过 GAC 完成的任何新代码部署进行 IIS 重置。如果您在 12 中放置任何内容,例如站点地图和资源,您将需要执行stsadm -o copyappbincontent

如果您部署包含应用程序文件的功能,您希望在场的所有服务器上卸载您的应用程序。可以通过将App_Offline.htm放在每台机器上每个应用程序的根目录中轻松完成。

完成后,删除 App_Offline.htm(或重命名),您就完成了。您的网站已重新上线。

于 2009-01-14T23:00:43.153 回答