I have 2 copies of the solution, each of which is compiled for a different version of the same third-party API and a different version of the .NET framework.
- Solution A - compiled against v2012 third-party API and .NET 4.0
- Solution B - compiled against v2011 third-party API and .NET 3.5
Solution A contains all the source files and links to Solution B with these files (using "Add as Link" in Visual Studio).
Conditional compilation is used to include code specific to one solution or another.
My solution contains some XAMLs (WPF Windows, User Controls and Resource Dictionaries). Solution B contacts these XAML files and compiles fine, but when I run it, I get a Set property 'System.Windows.ResourceDictionary.Source' threw an exception .
I reflected both versions of the assembly and the differences in resource names.
For example, one project contains the Windows/MyWindow.xaml , and the compiled assembly from solution A contains the windows/mywindow.baml , while in the assembly from Solution B the resource name is mywindow.baml .
Is there a way to compile the same XAML file into multiple projects?
source share