Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using a derived style defined in App.xaml makes UI fail to render in WASM debug #854

Closed
peternary opened this issue May 10, 2019 · 2 comments
Assignees
Labels
kind/bug Something isn't working platform/wasm 🌐 Categorizes an issue or PR as relevant to the WebAssembly platform

Comments

@peternary
Copy link

I'm submitting a...

  • Bug report (I searched for similar issues and did not find one)

Current behavior

If you define a style in App.xaml using the BasedOn attribute then using that style on a control causes the WASM build to fail to render, but only in Debug mode. Release works as expected.

Expected behavior

Derived styles should not cause issues in either Release or Debug modes

Minimal reproduction of the problem with instructions

In Mainpage.xaml using the style BaseTextBox or building in Release mode will load properly. Using Debug mode and the DerivedTextBox style will make render fail.
DerivedStylesSample.zip

Environment

Nuget Package:
Uno.UI
Package Version(s):
1.45.0-dev.1455
Affected platform(s):
- [ ] iOS
- [ ] Android
- [x] WebAssembly
- [ ] Windows
- [ ] Build tasks

Visual Studio
- [ ] 2017 (version: )
- [x] 2019 (version: 16.0.3)
- [ ] for Mac (version: )

Relevant plugins
- [ ] Resharper (version: )
@ghuntley ghuntley added platform/wasm 🌐 Categorizes an issue or PR as relevant to the WebAssembly platform kind/bug Something isn't working priority/backlog labels May 22, 2019
@jeromelaban
Copy link
Member

This is a duplicate of #47. For now, you'll need to move the resources in a merged dictionary referenced from App.xaml

@jeromelaban jeromelaban added the triage/duplicate Indicates an issue is a duplicate of other open issue. label May 29, 2019
@carldebilly
Copy link
Member

carldebilly commented Jun 18, 2019

The reason why it's not working in DEBUG, it's because it's generating an exception on DEBUG and it's becoming silent in RELEASE...

https://github.com/nventive/Uno/blob/d9d01e7a06f289d1188807573d3ce5487db0a35d/src/SourceGenerators/Uno.UI.SourceGenerators/XamlGenerator/XamlFileGenerator.cs#L2870

@jeromelaban: I think we should reopen this one, what do you think?

@carldebilly carldebilly reopened this Jun 18, 2019
@ghuntley ghuntley removed the triage/duplicate Indicates an issue is a duplicate of other open issue. label Jun 19, 2019
@carldebilly carldebilly self-assigned this Jun 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working platform/wasm 🌐 Categorizes an issue or PR as relevant to the WebAssembly platform
Projects
None yet
Development

No branches or pull requests

4 participants