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

預構建 MSBuild 任務以更新與構建的 exe 不同步的

Pre-build MSBuild task to update AssemblyInfo not in sync with built exe(預構建 MSBuild 任務以更新與構建的 exe 不同步的 AssemblyInfo)
本文介紹了預構建 MSBuild 任務以更新與構建的 exe 不同步的 AssemblyInfo的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

問題描述

我在 Visual Studio 2008 中使用調用 msbuild 的預構建任務:

I am using a pre-build task in Visual Studio 2008 that invokes msbuild:

C:WINDOWSMicrosoft.NETFrameworkv3.5MSBuild.exe $(MSBuildProjectDirectory)version.targets /p:Configuration=$(ConfigurationName)

在 version.targets 中,我正在更新 AssemblyInfo.cs 文件以替換版本信息:

Inside version.targets, I am updating the AssemblyInfo.cs file to replace version information:

   <FileUpdate
        Encoding="ASCII"
        Files="$(MSBuildProjectDirectory)PropertiesAssemblyInfo.cs"
        Regex="AssemblyInformationalVersion(&quot;.*&quot;)]" 
        ReplacementText="AssemblyInformationalVersion(&quot;Product $(ConfigurationString) ($(buildDate))&quot;)]"
    />

當我通過 Visual Studio 2008 構建項目時,它構建沒有任何問題.

When I build the project through Visual Studio 2008, it builds without any problems.

但是當我查看生成的 exe 的版本信息時,它包含以前的時間戳,即使 AssemblyInfo.cs 已更改為正確"的時間戳.

But when I look at the resulting exe's version information, it contains the previous time stamp even though the AssemblyInfo.cs has been changed with the "correct" one.

主編譯任務似乎看不到預構建的更改,并且總是落后.

It seems that the pre-build's changes aren't seen by the main compilation task and it's always one behind.

對我做錯了什么有任何想法嗎?

Any ideas of what I'm doing wrong?

推薦答案

我不認為你做錯了什么 - 這是一個錯誤.

I don't think you are doing anything wrong - it's a bug.

我已經報告了它這里 - 檢查你是否可以重現它并添加驗證,也許我們可以通過 MS 修復它.

I have reported it here - check if you can reproduce it and add a validation, maybe we can get it fixed by MS.

我嘗試了Si"的建議來更新BeforeBuild"事件中的文件 - 但是我仍然得到與 Visual Studio 2008/SP1 相同的錯誤結果.

I tried the suggestion by "Si" to update the file in the "BeforeBuild" event - however I still get the same wrong result with Visual Studio 2008/SP1.

更新/解決方法:MS 已回復錯誤報告.作為一種解決方法,您可以添加

UPDATE/WORKAROUND: MS has responded to the bug report. As a workaround you can add

<UseHostCompilerIfAvailable>FALSE</UseHostCompilerIfAvailable>

到您的 csproj 文件.

to your csproj file.

這篇關于預構建 MSBuild 任務以更新與構建的 exe 不同步的 AssemblyInfo的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

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

相關文檔推薦

Is there a C# library that will perform the Excel NORMINV function?(是否有執行 Excel NORMINV 函數的 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(給定輪班列表,創建時間表的摘要描述)
C# Normal Random Number(C# 普通隨機數)
Standard deviation of generic list?(通用列表的標準偏差?)
AsyncCTP: Creating a class that is IAwaitable(AsyncCTP:創建一個 IAwaitable 的類)
主站蜘蛛池模板: 免费中文字幕 | 中文字幕一区二区三区日韩精品 | 91大神新作在线观看 | 国产高清在线精品 | 久久一二区 | 一级欧美黄色片 | 色眯眯视频在线观看 | 国产乱码久久久久久一区二区 | 国产精品免费在线 | 欧美一区二区免费在线 | 国内自拍第一页 | 久久久青草婷婷精品综合日韩 | 久久91av| 国产亚洲精品综合一区 | 欧美成人hd | 天天看天天爽 | 中文字幕日韩一区 | 国产精品福利网站 | 免费能直接在线观看黄的视频 | 中文字幕日韩一区 | 成人免费高清 | 99精品视频在线观看免费播放 | 日韩精品一区二区不卡 | 午夜伦理影院 | 少妇无套高潮一二三区 | 国产精品久久久久久福利一牛影视 | 精品国产乱码久久久久久蜜臀 | 国产福利二区 | 激情五月婷婷丁香 | 女同久久另类99精品国产 | 黄色av网站在线观看 | 91午夜在线| 一区免费 | 日本中文在线视频 | 日本三级全黄三级a | 一道本不卡视频 | 色999视频 | 国产区精品视频 | 黄色在线免费观看视频网站 | 国产亚洲一区二区三区在线观看 | 波多野结衣先锋影音 |