简体   繁体   English

WSPBuilder没有正确地将所有文件添加到manifest.xml

[英]WSPBuilder doesn't add all Files to manifest.xml correctly

I use WSPBuilder to create WSP-Files from my Sharepoint projects. 我使用WSPBuilder从我的Sharepoint项目创建WSP文件。 Some of them contain Files in special folders like "Layouts" that need to be deployed. 其中一些包含需要部署的特殊文件夹中的文件,如“布局”。

When I use VS2010's ability to create a wsp-File using the "deploy" command, the wsp contains a manifest.xml like this: 当我使用VS2010使用“deploy”命令创建wsp-File时,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>

But when I use WSPBuilder the <TemplateFiles> section is completely missing. 但是当我使用WSPBuilder时, <TemplateFiles>部分完全缺失。 That is how I call WSPBuilder: 这就是我调用WSPBuilder的方式:

WspBuilder. tools.csprog -buildSafeControls false

Any idea how to get those templatefiles into the manifest.xml wit WSPBuilder? 知道如何将这些模板文件放入带有WSPBuilder的manifest.xml中吗?

You should not use the old WSPBuilder tool to build SharePoint 2010 packages. 您不应使用旧的WSPBuilder工具来构建SharePoint 2010包。 Use either Visual Studio or MSBuild if you need automate the process: 如果需要自动执行该过程,请使用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%

More information: How can I build a SharePoint 2010 package using command line? 更多信息: 如何使用命令行构建SharePoint 2010包?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM