Using XAML for business objects
-
This is a follow-up to http://www.codeproject.com/Messages/3896423/Create-business-objects-from-XML.aspx[^] for which I didn't get any answer. I'm experimenting with the idea of putting a static set of pre-defined business objects in a assembly (CRRT.Domain) by means of XAML. I have a ReportDefinitions.xaml file containing this:
Alas I get the following message: error MC3074: The tag 'ReportDefinition' does not exist in XML namespace 'clr-namespace:CRRT.Domain;assembly=CRRT.Domain'. Line 3 Position 3 What's wrong ? I checked that the classes do exist (in the proper namespace). And by the way, should this eventually work, where would the result of the compilation go ? In a resource ? I stumbled upon this last question by accident btw, my initial plan was to incorporate the XAML as a text resource and load it using XamlReader. But Visual Studio spotted the .xaml extension and created a build step.
-
This is a follow-up to http://www.codeproject.com/Messages/3896423/Create-business-objects-from-XML.aspx[^] for which I didn't get any answer. I'm experimenting with the idea of putting a static set of pre-defined business objects in a assembly (CRRT.Domain) by means of XAML. I have a ReportDefinitions.xaml file containing this:
Alas I get the following message: error MC3074: The tag 'ReportDefinition' does not exist in XML namespace 'clr-namespace:CRRT.Domain;assembly=CRRT.Domain'. Line 3 Position 3 What's wrong ? I checked that the classes do exist (in the proper namespace). And by the way, should this eventually work, where would the result of the compilation go ? In a resource ? I stumbled upon this last question by accident btw, my initial plan was to incorporate the XAML as a text resource and load it using XamlReader. But Visual Studio spotted the .xaml extension and created a build step.
Okay, I found how to make it compile: remove the assembly directive from the namespace declaration:
...
This works:
...
Now for my other question, where did the compilation product go ? And more importantly, how do I get at it ?