如何以编程方式列出执行 MSBuild 时定义的所有属性?

发布于 2024-07-19 05:41:06 字数 85 浏览 3 评论 0原文

我正在寻找一种方法来访问执行 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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

待天淡蓝洁白时 2024-07-26 05:41:06

如果您使用 /verbosity:detailed 或 /verbosity:diagnostic 运行构建,您将获得构建过程中使用的所有属性的非常详细的输出。 但是我怀疑您想在将构建的文件复制到另一个位置之后/之前更改配置类型文件? 在这种情况下,有几种机制可以做到这一点,我们发现工作得很好的是 MSBuildCommunity 任务,可以在 此处找到关于代码 plex

如果您想查看一些示例,我很乐意发布它们

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文