是否可以使用 WSPBuilder 创建沙盒解决方案?

发布于 2024-10-10 12:29:35 字数 1765 浏览 0 评论 0原文

我正在尝试使用 WSPBuilder 构建沙盒共享点解决方案,但在激活该功能时出现异常,manifest.xml 中的 Resources 元素无效。 Resources 元素列出了模块中包含的文件,该模块是功能的一部分。该解决方案不包含任何不可沙盒功能,因为可以激活不使用 WSPBuilder 创建的相同解决方案。 有没有人尝试过这样做并使其发挥作用?

这是wspbuilder创建的manifest.xml(稍微匿名):

<?xml version="1.0"?>
<!-- Solution created by WSPBuilder. 06.01.2011 15:02:38 * Solution compatibility: SharePoint 2010 -->
<Solution SolutionId="2235f481-04a4-4e9c-8c04-ed71c0b68cdf" Title="Branding Sandboxed" xmlns="http://schemas.microsoft.com/sharepoint/">
  <Assemblies>
    <Assembly Location="BrandingSolution.dll" DeploymentTarget="GlobalAssemblyCache" />
  </Assemblies>
  <FeatureManifests>
    <FeatureManifest Location="Branding\feature.xml" />
  </FeatureManifests>
  <Resources>
    <Resource Location="Branding\abc.master" />
    <Resource Location="Branding\abcscript.js" />
    <Resource Location="Branding\abcstyle.css" />
    <Resource Location="Branding\bg_resourceregion.gif" />
    <Resource Location="Branding\favicon.ico" />
    <Resource Location="Branding\jquery-1.4.2.min.js" />
  </Resources>
</Solution>

VS创建的manifest.xml如下(使用VS工具创建的功能相同):

<?xml version="1.0" encoding="utf-8"?>
<Solution xmlns="http://schemas.microsoft.com/sharepoint/" SolutionId="50e67e9e-2e3f-4034-8a0d-5aa7ce8dc89e" SharePointProductVersion="14.0">
  <Assemblies>
    <Assembly Location="SandboxedBranding.dll" DeploymentTarget="GlobalAssemblyCache" />
  </Assemblies>
  <FeatureManifests>
    <FeatureManifest Location="SandboxedBranding_Branding\Feature.xml" />
  </FeatureManifests>
</Solution>

i am trying to build a sandboxed sharepoint solution using WSPBuilder, but gets an exception when activating the feature, that the Resources element in manifest.xml is invalid. The Resources element lists the files contained in a module which is a part of a feature. The solution does not contain any non-sandboxable features, as the same solution created without WSPBuilder can be activated.
Has anyone tried to do this, and made it work?

This is the manifest.xml created by wspbuilder (slightly anonymized):

<?xml version="1.0"?>
<!-- Solution created by WSPBuilder. 06.01.2011 15:02:38 * Solution compatibility: SharePoint 2010 -->
<Solution SolutionId="2235f481-04a4-4e9c-8c04-ed71c0b68cdf" Title="Branding Sandboxed" xmlns="http://schemas.microsoft.com/sharepoint/">
  <Assemblies>
    <Assembly Location="BrandingSolution.dll" DeploymentTarget="GlobalAssemblyCache" />
  </Assemblies>
  <FeatureManifests>
    <FeatureManifest Location="Branding\feature.xml" />
  </FeatureManifests>
  <Resources>
    <Resource Location="Branding\abc.master" />
    <Resource Location="Branding\abcscript.js" />
    <Resource Location="Branding\abcstyle.css" />
    <Resource Location="Branding\bg_resourceregion.gif" />
    <Resource Location="Branding\favicon.ico" />
    <Resource Location="Branding\jquery-1.4.2.min.js" />
  </Resources>
</Solution>

The manifest.xml created by VS is as follows (same functionality created with the VS tools):

<?xml version="1.0" encoding="utf-8"?>
<Solution xmlns="http://schemas.microsoft.com/sharepoint/" SolutionId="50e67e9e-2e3f-4034-8a0d-5aa7ce8dc89e" SharePointProductVersion="14.0">
  <Assemblies>
    <Assembly Location="SandboxedBranding.dll" DeploymentTarget="GlobalAssemblyCache" />
  </Assemblies>
  <FeatureManifests>
    <FeatureManifest Location="SandboxedBranding_Branding\Feature.xml" />
  </FeatureManifests>
</Solution>

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文