久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

根據(jù)條件編譯符號更改exe的名稱

Change name of exe depending on conditional compilation symbol(根據(jù)條件編譯符號更改exe的名稱)
本文介紹了根據(jù)條件編譯符號更改exe的名稱的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

問題描述

能否告訴 Visual Studio 根據(jù)是否設(shè)置了特定的條件編譯符號來輸出不同名稱的 exe 文件?

Can you tell Visual Studio to output a different name of an exe file depending on if a specific conditional compilation symbol is set?

推薦答案

由于按照 Fredrik 的建議為 assemblyname 標記定義條件似乎使 Visual Studio 變得古怪,您可以稍后在 csproj 文件中更改程序集名稱.使用 Choose 元素 有點像 if 語句,所以是一個名稱如果滿足條件,可以附加,如下所示.

Since defining a condition to the assemblyname tag as suggested by Fredrik seems to make Visual Studio cranky, you can change the assembly name later in the csproj file. Using the Choose element is kind of like an if statement, so a name can be appended if a condition is met, demonstrated below.

從條件屬性中的例如 DefineConstants 中獲取子字符串似乎是不可能的(根據(jù) MSDN) 帶有plain vanilla MSBuild",但是可以定義自己的構(gòu)建目標并在使用 /p:Tag=value(MSBuild 命令行參考)

Getting a substring out of for instance DefineConstants in a condition attribute does not seem possible (according to MSDN) with "plain vanilla MSBuild", but one can define their own build targets and set a property when compiling with a /p:Tag=value (MSBuild command line reference)

  ...
  <Tag>true</Tag>
</PropertyGroup>
<Choose>
  <When Condition=" '$(Tag)' == 'true' ">
    <PropertyGroup>
      <AssemblyName>$(AssemblyName).TagDefined</AssemblyName>
    </PropertyGroup>
  </When>
</Choose>
<ItemGroup>
...

這篇關(guān)于根據(jù)條件編譯符號更改exe的名稱的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

【網(wǎng)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請聯(lián)系我們刪除處理,感謝您的支持!

相關(guān)文檔推薦

Is there a C# library that will perform the Excel NORMINV function?(是否有執(zhí)行 Excel NORMINV 函數(shù)的 C# 庫?)
Select x random elements from a weighted list in C# (without replacement)(從 C# 中的加權(quán)列表中選擇 x 個隨機元素(無需替換))
Create a summary description of a schedule given a list of shifts(給定輪班列表,創(chuàng)建時間表的摘要描述)
C# Normal Random Number(C# 普通隨機數(shù))
Standard deviation of generic list?(通用列表的標準偏差?)
AsyncCTP: Creating a class that is IAwaitable(AsyncCTP:創(chuàng)建一個 IAwaitable 的類)
主站蜘蛛池模板: 亚洲自拍偷拍免费视频 | 日韩欧美手机在线 | 国产精品18久久久久久白浆动漫 | av网站在线播放 | 精品日韩一区二区 | 午夜视频网站 | 国产日韩免费视频 | 国产在线视频在线观看 | 久久专区| 午夜私人影院在线观看 | 亚洲444eee在线观看 | www.操.com | 成人在线视频看看 | 日韩精品在线播放 | 久久久久久久久久久国产 | 亚洲欧美日韩中文字幕一区二区三区 | 天天拍天天操 | www.色.com| 精品国产91乱码一区二区三区 | 国产精品18hdxxxⅹ在线 | 日韩第一夜| 欧美日韩网站 | 亚洲成人蜜桃 | 国产日韩欧美在线观看 | 精品欧美一区二区三区久久久 | 亚洲免费在线观看av | 欧美精品成人 | 久久精品亚洲一区二区三区浴池 | 蜜月aⅴ国产精品 | 欧美.com | 一区二区三区四区不卡视频 | 国产乱码一区 | 精品免费国产视频 | 99久久婷婷国产综合精品电影 | 色综合99| 黑人巨大精品欧美一区二区一视频 | 日韩欧美在线观看视频 | 精品真实国产乱文在线 | 精品久久久久香蕉网 | 国产精品一区久久久 | 99久久久99久久国产片鸭王 |