I suggest you ...

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.

28 votes
Vote
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    Password icon
    I agree to the terms of service
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    Cleve LittlefieldCleve Littlefield shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

    4 comments

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      I agree to the terms of service
      Signed in as (Sign out)
      Submitting...
      • Daniel SteinerDaniel Steiner commented  ·   ·  Flag as inappropriate

        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 MitchamSteven Mitcham commented  ·   ·  Flag as inappropriate

        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 CalinoiuNicole Calinoiu commented  ·   ·  Flag as inappropriate

        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.

      Feedback and Knowledge Base