从构建后事件命令行构建 wsp

发布于 2024-12-06 06:38:58 字数 201 浏览 5 评论 0 原文

从构建后事件命令行构建 WSP 的命令是什么?

在此处输入图像描述

我将再添加一张图像,以便您能够了解我的确切要求。

在此处输入图像描述

What is the command for building WSP from post-build event command line?

enter image description here

I'm adding one more image so that you can understand my exact requirement.

enter image description here

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

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

发布评论

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

评论(5

半葬歌 2024-12-13 06:38:58

您可以使用 MSBuild 构建 WSP。每个 SharePoint 项目都是使用参数构建的

IsPackaging=True

通过将此参数添加到 msbuild 命令,您可以确保创建所有 WSP。

You can build a WSP by using MSBuild. Each SharePoint project is build with the parameter

IsPackaging=True

By adding this parameter to the msbuild command you can ensure that all WSPs will be created.

丶视觉 2024-12-13 06:38:58

我从这里找到了答案 它适用于 SharePoint 2007 和 2010。

调用“C:\Program文件\WSPTools\WSPBuilderExtensions\WSPBuilder.exe" -ProjectPath $(SolutionDir) -OutputPath $(SolutionDir) -SolutionPath $(SolutionDir)

I found the answer from here and it works for both SharePoint 2007 and 2010.

call "C:\Program Files\WSPTools\WSPBuilderExtensions\WSPBuilder.exe" -ProjectPath $(SolutionDir) -OutputPath $(SolutionDir) -SolutionPath $(SolutionDir)

梦忆晨望 2024-12-13 06:38:58

这个好像是VS2010。
如果您选择项目模板为 SharePoint 2010 项目,那么您将在上下文菜单中找到与 SharePoint 相关的项目。如果选择部署,它会自动创建wsp包并将其部署到服务器。

This seems to be VS2010.
If you choose the project template to be a SharePoint 2010 project then you will find items in the context menu that are related to SharePoint. If you choose deploy, it will create the wsp package automatically and deploy it to the server.

清风无影 2024-12-13 06:38:58

要强制 Visual Studio 在构建后为 SharePoint 解决方案创建 wsp,请将这些属性添加到项目 xml 中。如果您已经定义了构建后事件,只需将两个内部标记添加到现有属性组中即可。 Visual Studio 将在配置的位置创建 wsp;发布或调试。

要编辑项目 xml,请在 Visual Studio 中卸载该项目,然后右键单击该项目并选择编辑。

<PropertyGroup>
      <IsDebugging>False</IsDebugging>
 <PostBuildEventDependsOn>$(PostBuildEventDependsOn);CreatePackage</PostBuildEventDependsOn>
</PropertyGroup>

To force Visual Studio to create a wsp on post build for SharePoint solutions, add these properties to the project xml. If you already have a post build event defined, just add the two inner tags to the existing property group. Visual Studio will create the wsp in the configured location; Release or Debug.

To edit the project xml unload the project in visual studio then right-click on the project and select edit.

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