Using visual-studio: How can a XAML file be compiled into multiple projects in Visual Studio? on newest questions tagged visual-studio – Stack Overflow
I have 2 copies of a solution, each of which is compiled against a different version of the same 3rd party API and a different .NET framework version.
- Solution A – compiled against v2012 of a 3rd party API and .NET 4.0
- Solution B – compiled against v2011 of a 3rd party API and .NET 3.5
Solution A contains all the source files and Solution B links to these files (using “Add as Link” in Visual Studio).
Conditional compilation is used to include code that is specific to one solution or the other.
My solution contains some XAML (WPF Windows, User Controls & Resource Dictionaries). Solution B links to these XAML files and compiles ok, but when I run it I get a
Set property 'System.Windows.ResourceDictionary.Source' threw an exception exception.
I’ve Reflectored over both versions of the assembly and there are differences in the resource names.
For example, one project contains a
Windows/MyWindow.xaml file and the compiled assembly from Solution A contains a
windows/mywindow.baml resource, while in the assembly from Solution B the name of the resource is just
Is there a way to compile the same XAML file into multiple projects?
Using visual-studio: using-visual-studio