Skip to content
This repository has been archived by the owner on Sep 2, 2021. It is now read-only.

xcc does not work with ResourceDictionary #20

Open
Pantheas opened this issue Mar 11, 2020 · 1 comment
Open

xcc does not work with ResourceDictionary #20

Pantheas opened this issue Mar 11, 2020 · 1 comment

Comments

@Pantheas
Copy link

Pantheas commented Mar 11, 2020

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>

@michelevirgilio
Copy link

Same here

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants