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

如何從 MSBUILD 覆蓋 .NET 中引用的 CopyLocal(私有)設(shè)

How do I override CopyLocal (Private) setting for references in .NET from MSBUILD(如何從 MSBUILD 覆蓋 .NET 中引用的 CopyLocal(私有)設(shè)置)
本文介紹了如何從 MSBUILD 覆蓋 .NET 中引用的 CopyLocal(私有)設(shè)置的處理方法,對大家解決問題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

問題描述

我已經(jīng)為此苦苦掙扎了幾天,經(jīng)過大量搜索后,我找不到我應(yīng)該走的路.

I have been wrestling with this for a few days and after tons of searching I can't find the path I should be on.

我想要做的是設(shè)置一個(gè) MSBUILD 項(xiàng)目,它將構(gòu)建我們的整個(gè) .NET 應(yīng)用程序(8 個(gè)解決方案的常量,并且可能有 250 個(gè)項(xiàng)目在它們之間拆分),其中一些設(shè)置從單個(gè)項(xiàng)目文件中覆蓋以進(jìn)行自己的調(diào)試版本.

What I want to do is set up an MSBUILD project that will build our entire .NET application (constst of 8 solutions, and maybe 250 projects split up between them) with a number of settings overridden from the individual project files to make a debug build for myself.

具體來說,我想構(gòu)建我們的發(fā)布配置,關(guān)閉優(yōu)化并生成完整的調(diào)試信息/pdb.另外,為了減少我們目前超長的構(gòu)建時(shí)間,我希望每個(gè)項(xiàng)目的每個(gè)引用都復(fù)制本地"(或?qū)嶋H項(xiàng)目文件 xml 中的私有)為 false.

Specifically I want to build our release configuration with optimizations off and full debug info / pdbs generated. Also, in order to reduce our currently ultra-long build time I want "copy local" (or private in the actual proj file xml) false for every reference of every project.

第一件事很簡單,我可以很容易地覆蓋項(xiàng)目級別的屬性(您甚至可以使用/p 從 MSBuild 命令行執(zhí)行此操作),但我不知道如何覆蓋一個(gè)參考.我已經(jīng)嘗試了一些我在 StackOverflow 和網(wǎng)絡(luò)上看到的東西,但還沒有一個(gè)解決方案.

The first things were fairly easy, I can override a project level property fairly easily (you can even do this from the MSBuild command line using /p), but what I can't figure out is how to override a property on a reference. I have tried several things I saw here on StackOverflow and around the web, but nothing is a solution yet.

我可以通過更改 Microsoft.Common.targets 來做我想做的事,注釋掉 _CopyFilesMarkedCopyLocal 目標(biāo)中的代碼會完全跳過這些文件的復(fù)制.但我不想改變我的全局配置并在所有情況下都這樣做.我創(chuàng)建了自己的備用目標(biāo)文件——如果我改變一個(gè)單獨(dú)的項(xiàng)目文件以指向它,它就可以工作——但我不知道如何指定它在頂層使用(我的 .proj 文件只是構(gòu)建所有 8 個(gè)解決方案).如果我能以某種方式僅覆蓋頂層的 _CopyFilesMarkedCopyLocal 目標(biāo),那就太好了,這樣如果 MS 更改了默認(rèn)目標(biāo)文件,我的構(gòu)建就不會搞砸,但我也不知道如何使它工作.

I can do what I want by altering Microsoft.Common.targets, commenting out the code in the _CopyFilesMarkedCopyLocal target completely skips the copying of these files. But I don't want to alter my global configuration and do this in all circumstances. I created my own alternate targets file -- which works if I alter an individual project file to point to it -- but I can't figure out how to specify this to be used at the top level (my .proj file that just builds all 8 solutions). It would be great if I could somehow override just the _CopyFilesMarkedCopyLocal target at the top level so that if MS changes the default targets file my build isn't screwed up, but I can't figure out how to make this work either.

如果有一種方法可以覆蓋參考級別屬性,就像您可以項(xiàng)目級別屬性一樣,而不必重寫/覆蓋構(gòu)建目標(biāo)的東西,那么最好的可能就是 - 但我沒有發(fā)現(xiàn)任何信息表明這是可能的.

The best possible thing would be if there was a way to just override reference level properties like you can project level properties, without having to rewrite/override the build targets stuff -- but I have found no information indicating this is possible.

提前感謝您對此提供的任何幫助.

Thanks in advance for any help on this.

附言我實(shí)際上不可能瀏覽所有項(xiàng)目文件并更改它們;我需要一個(gè)解決方案,讓現(xiàn)有代碼保持原樣.

P.S. It is not possible for me to actually just go through all the projects files and change them; I need a solution that leaves the existing code in place as is.

推薦答案

試試這個(gè):

CustomAfterMicrosoftCommonTargets 設(shè)置為 C:foofilter.targets (或任何您命名的文件) 并將 filter.targets 設(shè)置為:

Set the CustomAfterMicrosoftCommonTargets to C:foofilter.targets (or whatever you name the file) and have filter.targets to be:

<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
    <ItemDefinitionGroup>
      <Reference>
        <Private>False</Private>
      </Reference>
    </ItemDefinitionGroup>
</Project>

這篇關(guān)于如何從 MSBUILD 覆蓋 .NET 中引用的 CopyLocal(私有)設(shè)置的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

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

相關(guān)文檔推薦

Is there a way to know if someone has bookmarked your website?(有沒有辦法知道是否有人為您的網(wǎng)站添加了書簽?)
Use of Different .Net Languages?(使用不同的 .Net 語言?)
Determining an #39;active#39; user count of an ASP.NET site(確定 ASP.NET 站點(diǎn)的“活動用戶數(shù))
Select x random elements from a weighted list in C# (without replacement)(從 C# 中的加權(quán)列表中選擇 x 個(gè)隨機(jī)元素(無需替換))
Best way to keep track of current online users(跟蹤當(dāng)前在線用戶的最佳方式)
Recommend an Open Source .NET Statistics Library(推薦一個(gè)開源的.NET統(tǒng)計(jì)庫)
主站蜘蛛池模板: 欧美精品亚洲精品 | 亚洲激情在线播放 | 亚洲成人免费 | 日韩一级大片 | 青青草精品 | 精久久久 | 精品欧美一区二区精品久久 | 日韩视频免费看 | 国产美女精品视频 | 天天综合精品 | 一区二区三区免费看 | 一区二区三区四区精品 | 最新日韩av | 天堂影院av | 欧美黄色片在线观看 | 日韩在线视频一区二区三区 | 久久综合在线 | www.嫩草| 黄色片www| 日本一级淫片色费放 | 久久99精品久久久久久水蜜桃 | 国产免费小视频 | 97超碰在线免费观看 | 午夜视频免费观看 | 天海翼在线视频 | 国产精品久久久久久妇女6080 | 亚洲成人一区 | 欧美高清在线 | 国产美女视频网站 | 四虎av在线 | 欧美国产在线观看 | 国产黄色片网站 | 在线h片| 国产一区二区自拍 | 中文字幕在线观看网站 | 欧美精品久久久久 | 亚洲久久久| 黄色一区二区三区 | 午夜精品一区二区三区在线播放 | 中文字幕第一区综合 | 国产黄色精品 |