使用 VSeWSS 1.3 编写 Sharepoint Web 部件时命名空间发生冲突

发布于 2024-10-15 20:00:19 字数 557 浏览 2 评论 0原文

我和我的同事都使用 Visual Studio 和 VSeWSS 1.3 来编写 Sharepoint Web 部件以部署到同一个 Sharepoint 2007 Intranet。

打包解决方案时,Web 部件代码始终保存到名为 WebParts 的文件夹中(如果解决方案中有多个 Web 部件,则会创建名为 WebParts_n 的附加文件夹,其中 n 是 Web 部件的编号)。此文件夹结构反映在解决方案的manifest.xml 文件中。

第一个解决方案部署得很好,没有任何问题。但是,当尝试部署后续解决方案时,会引发错误,因为后续解决方案还尝试将文件保存到 12 hive TEMPLATE/FEATURES 文件夹中名为 WebParts 的文件夹中。

因此,我们尝试更改解决方案中的文件夹名称,以便它们对于 Web 部件来说是唯一的。我更改了manifest.xml 文件来反映这一点。但是,每次打包解决方案时,它都会使用 WebParts 文件夹,并恢复 manifest.xml 文件以反映这一点。

我们在这里做错了什么?当然有一种方法可以编写解决方案/功能,以便将它们的代码放在自己的文件夹中,从而避免名称空间冲突。

My colleague and I are bothing using Visual Studio with VSeWSS 1.3 to write Sharepoint Web Parts to deploy to the same Sharepoint 2007 intranet.

When packaging the solution, the web part code is always saved into a folder called WebParts (if there are multiple web parts in the solution additional folders called WebParts_n are created where n is the number of the web part). This folder structure is reflected in the manifest.xml file for the solution.

The first solution deploys fine without any problem. However, when trying to deploy subsequent solutions, an error is thrown because the subsequent solutions are also trying to save files into a folder called WebParts in the 12 hive TEMPLATE/FEATURES folder.

So we are trying to change the folder names in the solutions so they are unique to the web part. I change the manifest.xml file to reflect this. However, every time the solution is packaged, it uses WebParts folders, and reverts the manifest.xml file to reflect this.

What are we doing wrong here? Surely there is a way to write Solutions/Features so their code is put in their own folder, avoiding a name space clash.

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

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

发布评论

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

评论(1

つ低調成傷 2024-10-22 20:00:19

我的同事刚刚发现,如果您进入 WSP 视图,然后在其下的文件夹上单击两次(单击之间有足够大的间隙),您可以重命名它们。这会更新manifest.xml 文件。看起来配置已经完成了。

My colleague just discovered that if you go into WSP View, and click twice (with a big enough gap between clicks) on the folders under that, you can rename them. This updates the manifest.xml file. Looks like this is where the configuration is done.

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