3

我使用 WSPBuilder 从我的 Sharepoint 项目中创建 WSP 文件。其中一些包含特殊文件夹中的文件,例如需要部署的“布局”。

当我使用 VS2010 的“部署”命令创建 wsp 文件的能力时,wsp 包含一个 manifest.xml,如下所示:

<?xml version="1.0" encoding="utf-8"?>
<Solution xmlns="http://schemas.microsoft.com/sharepoint/" SolutionId="2d5da9c1-0fe4-4ff8-9f4d-c025cf9bc2c1" SharePointProductVersion="14.0">
  <Assemblies>
    <Assembly Location="Tools.dll" DeploymentTarget="GlobalAssemblyCache" />
  </Assemblies>
  <TemplateFiles>
    <TemplateFile Location="Layouts\GetThumbnail.aspx" />
  </TemplateFiles>
</Solution>

但是当我使用 WSPBuilder 时,该<TemplateFiles>部分完全丢失了。这就是我调用 WSPBuilder 的方式:

WspBuilder. tools.csprog -buildSafeControls false

知道如何使用 WSPBuilder 将这些模板文件放入 manifest.xml 吗?

4

1 回答 1

1

您不应使用旧的 WSPBuilder 工具来构建 SharePoint 2010 包。如果您需要自动化该过程,请使用 Visual Studio 或 MSBuild:

set msbuild="C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe"
set config=Debug
set outdir="C:\out\"
%msbuild% /p:Configuration=%config% /m ../My.SharePoint.Project/My.SharePoint.Projectcsproj /t:Package /p:BasePackagePath=%outdir%

详细信息:如何使用命令行构建 SharePoint 2010 包?

于 2011-11-02T17:02:22.490 回答