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

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

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

問題描述

能否告訴 Visual Studio 根據(jù)是否設置了特定的條件編譯符號來輸出不同名稱的 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",但是可以定義自己的構建目標并在使用 /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>
...

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

【網(wǎng)站聲明】本站部分內容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯(liá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# 中的加權列表中選擇 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 的類)
主站蜘蛛池模板: 日日av | 日韩中文字幕一区二区 | 国产精品高潮呻吟久久 | 中文字幕在线观 | 色婷婷中文字幕 | 日日干日日 | 黄色在线观看免费 | 中文字幕不卡视频 | 精品亚洲国产成人av制服丝袜 | 日韩视频精品 | 日韩一级在线观看 | 中文在线观看免费网站 | 在线观看av不卡 | 日韩免费小视频 | www99热 | 日韩三级中文字幕 | 在线免费观看毛片 | 日本欧美久久久久免费播放网 | 国产91免费 | 国产天堂网 | www.久久精品| 狠狠干狠狠插 | 精品久久久久久久久久久久久 | 国产成人a亚洲精品 | 手机在线看片1024 | 视频一区二区在线观看 | 欧美视频在线播放 | 一区在线观看视频 | 男人天堂网址 | 久久久国产精品人人片 | 特一级黄色片 | 欧美精品系列 | 特级黄色片 | 中文字幕在线一区二区三区 | 欧美日本一区 | 中文字幕免费在线 | 午夜看看 | 国产精品第二页 | 亚洲精品午夜 | 婷婷久久综合 | 高hnp失禁3p小公主 |