如何从命令行创建Sharepoint包(* .wsp) [英] How can I create a Sharepoint package (*.wsp) from command line

查看:127
本文介绍了如何从命令行创建Sharepoint包(* .wsp)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在一个解决方案中,我有许多SharePoint Web部件项目.要部署Web部件,我使用Visual Studio中解决方案资源管理器中的发布..."选项.然后使用stsadm.exe将它们部署在SharePoint服务器上.

I have a number of SharePoint web part projects in a single solution. To deploy a web part, I am using the "Publish..." option from solution explorer in visual studio. Then use the stsadm.exe to deploy them on SharePoint server.

是否可以从命令行生成* .wsp软件包?

Is it possible to generate a *.wsp package from the command line?

推荐答案

您可以使用

You can use msbuild tool to generate wsp packages.

下面您可以找到cmd脚本的示例:

Below you can find example of cmd script:

set msbuild="C:\WINDOWS\Microsoft.NET\Framework64\v4.0.30319\MSBuild.exe"
set config=Release
set outdir2=C:\out\
rd /S /Q "%outdir2%"
%msbuild% /p:Configuration=%config% /m "C:\Test\test.csproj" /t:Package /p:BasePackagePath=%outdir2%
for /F "tokens=*" %%i in ('dir /B /S "%outdir2%"') do if not %%~xi == .wsp del %%i

这篇关于如何从命令行创建Sharepoint包(* .wsp)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆