Comments (6)
This is a known issue for WASM, this works for iOS and Android.
The best workaround for now is to declare it in a merged resource dictionary.
from uno.
I reproduced the problem and I found the cause... it's very far from the reported bug.
The actual cause
The Wasm version of MvvmLight will use the netstandard1.0 version of the package and the IoC in this version won't implement the IServiceLocator
.
Since the project Uno.Core
is compiled in netstandard2.0, it will include his own version of CommonServiceLocator
(v1.3) as defined in this bug I just opened: unoplatform/Uno.Core#53
What is happening in the app
-
The initial navigation to
MainPage.xaml
will be initiated -
In the
MainPage.xaml
InitializeComponent(), Uno will successfully resolve theLocator
resource -
Uno will call the
MainPageViewModelInstance
property ofViewModelLocator
-
This one will cast
SimpleIoc.Default as IServiceLocator
, which is not implemented this way -
A null-reference exception will terminate the initial navigation, leading to the false interpretation there's a problem with resources.
I will close this bug as not related to Uno directly (the real issue has been created in Uno.Core
project). Feel free to reopen it or ask more details.
from uno.
Ooohhh... by the way, to find this problem I found those 2 assemblies must be removed from linker in the LinkerConfig.xml
:
<assembly fullname="UnoTest.Wasm" />
<assembly fullname="GalaSoft.MvvmLight.Platform" />
from uno.
- Thanks for diagnosing the bug.
- Unfortunately without
<assembly fullname="UnoTest.Wasm" />
accessing data with BreezeSharp doesn't work, I mean, the list with received data is not displayed.
from uno.
When I said removed from linker, it means those lines must be added to the config file ;-)
Sorry for the confusion.
from uno.
Aaa, OK :) Thanks.
from uno.
Related Issues (20)
- [WASM] keepalive C# generator executes in F# project HOT 1
- Is __LINUX__ missing? HOT 2
- [Skia] Measure/Arrange occur too many times in `Given_Border.When_Child_Set_Same_Reference`
- Typo in Uno.Implicit.Packages.targets
- NuGet override doesn't play nicely with non-uno-runtime-enabled packages HOT 1
- Compile error when using a PackageReference that is not updated to last Uno Platform version HOT 3
- Build fails after Changing the Application Display Version HOT 2
- WPF SelfContained Support (non-cross)
- WPF SelfContained Support (cross)
- ClickOnce Support
- Enhanced .dmg image publish
- Ubuntu Snap Support
- Flatpak Support
- AppImage Support
- Tarball Publish Support
- When using a multi Window, the event Closed or Unloaded on a control is never called HOT 1
- [WASM] `DoubleAnimation` with Converter Behaves Weirdly but works with `Setters`
- [ski Linux] The app does not scale properly on a laptop with a big resolution HOT 6
- WebView2 - External links issue
- WinAppSdk + Single Project *.csproj : Can't command line build because of `GenerateSplashAssets_... task failed unexpectedly`
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from uno.