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

xcc does not work with ResourceDictionary #20

@Pantheas

Description

@Pantheas

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>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions