如何 [英] How to

查看:46
本文介绍了如何的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我需要在不同服务器上推送文件,具体取决于构建期间输入的值。


我已经定义了5个不同的变量


- Target-stg:服务器#1#2


- Target-int:服务器#3#4


- 等。


我们如何使用这5个变量中的1个,这取决于我们推送Build时输入的值。


谢谢


Steve

解决方案

您好, 


与项目文件中使用的变量相同

< PropertyGroup Condition =" '


(配置)|


(平台)'=='Debug | x86'">
< PlatformTarget> x86< / PlatformTarget>
< DebugSymbols> true< / DebugSymbols>
< DebugType>完整< / DebugType>
< Optimize> false< / Optimize>
< OutputPath> bin \Debug \< / OutputPath>
< DefineConstants> DEBUG; TRACE< / DefineConstants>
< ErrorReport>提示< / ErrorReport>
< WarningLevel> 4< / WarningLevel>
< / PropertyGroup>

还有< Choise> -element


https://docs.microsoft.com/en-us/visualstudio/msbuild/choose-element-msbuild?view=vs-2017


Hi,

I need to push files on different servers, depending of the value entered during the build.

I already have 5 differents variables defined

- Target-stg : server #1 #2

- Target-int : server #3 #4

- etc.

How can I used 1 of these 5 variables, depending of an entered values when we pushed a Build.

Thanks

Steve

解决方案

Hello, 

In the same way as variables used in project file

<PropertyGroup Condition=" '


(Configuration)|


(Platform)' == 'Debug|x86' "> <PlatformTarget>x86</PlatformTarget> <DebugSymbols>true</DebugSymbols> <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>bin\Debug\</OutputPath> <DefineConstants>DEBUG;TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> </PropertyGroup>

There also is <Choise>-element

https://docs.microsoft.com/en-us/visualstudio/msbuild/choose-element-msbuild?view=vs-2017


这篇关于如何的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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