Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

Crash when trying to include resource dictionary from another resource dictionary #3655

Open
toomasz opened this issue Aug 24, 2018 · 2 comments
Assignees
Labels
a/Xaml </> help wanted We welcome community contributions to any issue, but these might be a good place to start! i/high Completely doesn't work, crashes, or is unusably slow, has no obvious workaround; occurs less often t/bug 🐛 up-for-grabs We welcome community contributions to any issue, but these might be a good place to start!

Comments

@toomasz
Copy link
Contributor

toomasz commented Aug 24, 2018

Description

When trying to include resource dictionary from another resource dictionary, exception occurs:
Xamarin.Forms.Xaml.XamlParseException: Position 6:25. Resource 'GlobalResources.xaml' not found.

Included test app that reproduces issues has following structure:

Resources/GlobalResources.xaml
Resources/LabelStyles.xaml <- includes GlobalResources.xaml
MainPage.xaml <- includes LabelStyles.xaml

Workaround:
Strangely, issue doesn't occur when xml declaration:

<?xaml-comp compile="true" ?>
is included at top of dictionary file that references another dictionary.
[assembly: XamlCompilation(XamlCompilationOptions.Compile)] does not seem to affect bug occurence.

Steps to Reproduce

  1. Include two pure XAML resource dictionaries to forms project
  2. Include top dictionary in page or other XAML file

Expected Behavior

App should not crash

Actual Behavior

App crashes with resource not found exception

Basic Information

  • Version with issue: 3.1.0.697729
  • IDE: Visual Studio 17 15.8
  • Platform Target Frameworks:
    • Android: 8.1
  • Affected Devices: Multiple(tested on Galaxy S8)

Screenshots

image

Reproduction Link

DictLink.zip

@StephaneDelcroix StephaneDelcroix self-assigned this Sep 4, 2018
@samhouts samhouts added the inactive Issue is older than 6 months and needs to be retested label Feb 21, 2019
@samhouts samhouts added the i/high Completely doesn't work, crashes, or is unusably slow, has no obvious workaround; occurs less often label May 29, 2019
@samhouts samhouts added help-wanted up-for-grabs We welcome community contributions to any issue, but these might be a good place to start! help wanted We welcome community contributions to any issue, but these might be a good place to start! and removed help-wanted labels Jun 28, 2019
@samhouts samhouts added the in-progress This issue has an associated pull request that may resolve it! label Oct 18, 2019
@samhouts samhouts added inactive Issue is older than 6 months and needs to be retested and removed inactive Issue is older than 6 months and needs to be retested labels Nov 5, 2019
@samhouts samhouts removed in-progress This issue has an associated pull request that may resolve it! inactive Issue is older than 6 months and needs to be retested labels Apr 16, 2020
@EmilAlipiev
Copy link
Contributor

wow this is still open. is that not a bug?

@samhouts samhouts added this to the 5.0.0 milestone Aug 13, 2020
@samhouts samhouts removed this from the 5.0.0 milestone Nov 2, 2020
@EmilAlipiev
Copy link
Contributor

anyone here?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
a/Xaml </> help wanted We welcome community contributions to any issue, but these might be a good place to start! i/high Completely doesn't work, crashes, or is unusably slow, has no obvious workaround; occurs less often t/bug 🐛 up-for-grabs We welcome community contributions to any issue, but these might be a good place to start!
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants