如何以编程方式列表中定义的所有属性? [英] How to programatically list all properties defined?
问题描述
我正在寻找一种方式来访问所有在执行的MSBuild定义生成的属性。我有一个配置文件。我想修改配置文件中的属性,并将其复制到新的位置。有没有办法做到这一点?
I'm looking for a way to access all the Build properties defined while executing MSBuild. I have a configuration file. I want to modify the Properties in the configuration file and copy it to a new location. Is there a way to do it?
推荐答案
如果您运行/冗长的生成:详细或/冗长:诊断你会得到这是在构建过程中使用的所有属性的非常详细的输出。不过,我怀疑你想更改/后一个配置文件类型你建造文件复制到另一个位置之前?在这种情况下,有几个mechanismes要做到这一点,我们已经找到了工作,pretty好,是可以找到的MSBuildCommunity任务这里code复杂
If you run the build with /verbosity:detailed or /verbosity:diagnostic you will get very detailed output of all the properties that was used during your build process. However I suspect you want to change a config type file after/before you copy the builded files to another location? In that case there is several mechanismes to do that, what we have found to work pretty good, is the MSBuildCommunity tasks that can be found here on code plex
如果你想看到的这一些样品我很高兴能张贴
If you would like to see some samples of this I would be glad to post them
这篇关于如何以编程方式列表中定义的所有属性?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!