xcc
xcc copied to clipboard
xcc does not work with ResourceDictionary
I am trying to load different resources for my app based on some preprocessor condition. However, when starting the application, it fails throwing the following exception:
Xamarin.Forms.Xaml.XamlParseException: 'Position xx:xx. StaticResource not found for key [some resource key here]'
Code looks like this:
<Application
...
xmlns:DEBUG="condition:DEBUG"
xmlns:RELEASE="condition:RELEASE">
<DEBUG:Application.Resources>
...
</DEBUG:Application.Resources>
<RELEASE:Application.Resources>
...
</RELESE:Application.Resources>
The exception does also occur when setting the conditional namespace at ResourceDictionary
level:
<DEBUG:ResourceDictionary>...</DEBUG:ResourceDictionary>
Same here