Allow assembly references to switch based on configuration
This works already for project references but not file references. Reference debug locations in debug build, release locations in release build.
4 comments
-
Daniel Steiner
commented
-
Daniel Steiner
commented
in addition to directory location it would be helpful if references to assembly can be disabled based on the configuration such that using conditional compilation can reference method from assemblies which are available in some configuration only, e.g. some debugging assembly etc.
-
Steven Mitcham
commented
MSBuild supports this already, but you have to edit the project files manually. Add $(Configuration) into the file path and you'll reference different files based on configuration.
-
Nicole Calinoiu
commented
If a change is considered to reference "modes", I'd also love to see something that allows ease of switching between project and external references. This would be meant to facilitate scenarios where one usually works with external references but occasionally need to load the dependencies as projects in a single solution either for debugging scenarios or to facilitate application of breaking changes.
For quite some time, I've been using macros to switch reference types within an infrequently used "mega solution", and it would be great to be able to avoid the potential risk of checking projects into source control with inappropriate project-style references. Something like a solution-level override for reference modes that acts without changing the actual project files would be fantastic.