I have three projects in my solution:
ProjectA : contains reference to ProjectC
ProjectB : contains reference to ProjectC
ProjectC : references third.party.dll.A or third.party.dll.B
During compilation, I want Project C to reference either third.party.dll.A or third.party.dll.B depending on which one of ProjectA or ProjectB that I a have set as the startup project and am launching/compiling via the IDE.
How can I set up my solution so I can use an MSBuild conditional reference in ProjectC.csproj to determine whether ProjectA or ProjectB is currently being compiled?
(In the .csproj file I tried checking if $(DefineConstants) contains a certain value, but it seems like $(DefineConstants) only contains the symbols defined in ProjectC, and not those defined in ProjectA and ProjectB.)
(FYI: I am using Xamarin Studio on a Mac. But I assume that if there is a way to make this work for Visual Studio, it should also work in Xamarin Studio.)