用于跳过目录的MSbuild命令行参数 [英] MSbuild command line parameter for skipping the directory

查看:121
本文介绍了用于跳过目录的MSbuild命令行参数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Team City中具有以下命令行参数以进行部署.一切正常,但我想在部署时跳过一些目录.我如何在团队城市中的以下msbuild脚本中添加该逻辑

I have following command line parameters in team city for deployment. everything works fine but i want to skip some directory while deployment. how can i add that logic in following msbuild script in team city

/P:Configuration=%env.Configuration%
/P:DeployOnBuild=True
/P:DeployTarget=MSDeployPublish
/P:MsDeployServiceUrl=https://%env.TargetServer%/MsDeploy.axd
/P:AllowUntrustedCertificate=True
/P:MSDeployPublishMethod=WMSvc
/P:CreatePackageOnPublish=True
/P:SkipExtraFilesOnServer=True
/P:UserName=xxxxx
/P:Password=xxxxx

推荐答案

我正在做同一件事.我不喜欢必须修改我的.csproj文件,所以我尝试了此操作.到目前为止,它对我有用.就我而言,我从部署中排除了媒体,App_Data \ Logs和App_Data \ preview文件夹,而不是Data文件夹.

I was working on the same thing. I didn't like having to modify my .csproj file, so I tried this. It is working for me so far. In my case, I was excluding the media, App_Data\Logs, and App_Data\preview folders from deployment instead of the Data folder.

基本上,您可以将ExcludeFoldersFromDeployment作为参数传递给MSBuild.将其与SkipExtraFilesOnServer结合使用即可达到目的.

Basically, you can pass the ExcludeFoldersFromDeployment as a parameter to MSBuild. Combining that with the SkipExtraFilesOnServer does the trick.

/p:Configuration=Debug
/p:DeployOnBuild=True
/p:DeployTarget=MSDeployPublish
/p:MsDeployServiceUrl=OurDevWebServer/msdeployagentservice
/p:AllowUntrustedCertificate=True
/p:MSDeployPublishMethod=RemoteAgent
/p:CreatePackageOnPublish=True
/p:DeployIisAppPath=umbraco_TestSite
/p:IgnoreDeployManagedRuntimeVersion=True
/p:SkipExtraFilesOnServer=True
/p:ExcludeFoldersFromDeployment="media;App_Data\Logs;App_Data\preview"
/p:IncludeSetAclProviderOnDestination=False
/p:AuthType=NTML /p:UserName=

这篇关于用于跳过目录的MSbuild命令行参数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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