MSBuild中ProjectReference的配置 [英] Configuration for ProjectReference in MSBuild

查看:393
本文介绍了MSBuild中ProjectReference的配置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以在MSBuild中设置ProjectReference的配置?

Is it possible to set the configuration of ProjectReference in MSBuild?

场景: 我有一个构建脚本(Web部署),该脚本具有许多配置,唯一的区别在于它们的部署方式,而不是其自身构建.我讨厌必须维护我的解决方案/项目的配置,这些解决方案/项目是在部署过程中构建的,因为我需要这些配置才能进行部署. 有什么办法可以做到这一点?

Scenario: I have a build script (web deploy) that has a number of configurations where the only difference has to do with how they are deployed and not the build it self. I would hate to have to maintain configurations for my solution/projects that are build as a part of the deploy process just because I need those configurations for deployment. Any way I can accomplish this?

推荐答案

问题留给别人以防万一.解决方案非常简单. 不要这样扭转局面.只需对部署脚本使用任何其他属性,然后将不同的部署配置映射到现有的Project配置.

Leaving the question in case some one else gets the same idea as I did. The solution was pretty straight forward. Don't do it. Turn it around. Just use any other property for the deployment script and map the different deployment configuration to existing Project configurations.

这篇关于MSBuild中ProjectReference的配置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆