Link all for project using FreshMvvm - Android
See original GitHub issueHi there,
Is there a way to get an app that is using this library with linking set to “Sdk and User Assemblies” set in the project configuration on android to work?
I am setting linking to ‘Sdk and User Assemblies’ and Ive added the [Preserve(AllMembers = true)] attribute on PageModels and Pages to attempt to preserve FreshMvvm (which is probably incorrect anyway), but its throwing an exception on the follow line in my app.cs file:
Page loginPage = FreshPageModelResolver.ResolvePageModel<LoginPageModel>();
The exception I was getting was:
at FreshTinyIoC.FreshTinyIoCContainer.ConstructType (System.Type requestedType, System.Type implementationType, System.Reflection.ConstructorInfo constructor, FreshTinyIoC.NamedParameterOverloads parameters, FreshTinyIoC.ResolveOptions options) [0x0006b] in C:\Projects\FreshMvvm\src\FreshIOC\FreshTinyIOC.cs:3339
at FreshTinyIoC.FreshTinyIoCContainer.ConstructType (System.Type requestedType, System.Type implementationType, FreshTinyIoC.NamedParameterOverloads parameters, FreshTinyIoC.ResolveOptions options) [0x00000] in C:\Projects\FreshMvvm\src\FreshIOC\FreshTinyIOC.cs:3314
at FreshTinyIoC.FreshTinyIoCContainer.ResolveInternal (FreshTinyIoC.FreshTinyIoCContainer+TypeRegistration registration, FreshTinyIoC.NamedParameterOverloads parameters, FreshTinyIoC.ResolveOptions options) [0x001b2] in C:\Projects\FreshMvvm\src\FreshIOC\FreshTinyIOC.cs:3175
at FreshTinyIoC.FreshTinyIoCContainer.Resolve (System.Type resolveType) [0x00000] in C:\Projects\FreshMvvm\src\FreshIOC\FreshTinyIOC.cs:1184
at FreshMvvm.FreshTinyIOCBuiltIn.Resolve (System.Type resolveType) [0x00000] in C:\Projects\FreshMvvm\src\FreshMvvm\FreshTinyIOCBuiltIn.cs:48
at FreshMvvm.FreshPageModelResolver.ResolvePageModel (System.Type type, System.Object data, FreshMvvm.FreshBasePageModel pageModel) [0x0002d] in C:\Projects\FreshMvvm\src\FreshMvvm\FreshPageModelResolver.cs:41
at FreshMvvm.FreshPageModelResolver.ResolvePageModel[T] (System.Object data, T pageModel) [0x0000b] in C:\Projects\FreshMvvm\src\FreshMvvm\FreshPageModelResolver.cs:25
at FreshMvvm.FreshPageModelResolver.ResolvePageModel[T] (System.Object initData) [0x0000b] in C:\Projects\FreshMvvm\src\FreshMvvm\FreshPageModelResolver.cs:19
at FreshMvvm.FreshPageModelResolver.ResolvePageModel[T] () [0x00000] in C:\Projects\FreshMvvm\src\FreshMvvm\FreshPageModelResolver.cs:12
at SampleApp.App..ctor () [0x00019] in C:\Users\Admin\Xenia\Client\SampleApp\SampleApp\SampleApp\App.xaml.cs:59
The message was:
"Resolve failed: LoginPage"
There was no inner exception to go with either.
Im guessing maybe the ResolvePageModel cannot resolve the page from the page model type due to reflection being stripped out in this library?
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (1 by maintainers)
Top Results From Across the Web
FreshMvvm for Xamarin.Forms
FreshMvvm is a super light Mvvm Framework designed specifically for Xamarin.Forms. It's designed to be Easy, Simple and Flexible.
Read more >Xamarin Forms: IOC in FreshMvvm
I am using Freshmvvm for my Xamarin forms project. I am using a camera and want to use platform specific features. So, I...
Read more >Michael Ridland - RSSing.com
I use FreshMvvm in the majority of my projects. I love it's simplicity but most of all it's flexibility. The Framework is Interface...
Read more >Tabbed Page In Xamarin.Forms Using FreshMvvm
According to Github, FreshMvvm is a super light Mvvm Framework designed specifically for Xamarin.Forms. It's designed to be simple and flexible.
Read more >Setting up a basic MVVM architecture in .NET MAUI
Setting up a basic MVVM architecture and Navigation service in .NET MAUI, without 3rd party libraries.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi @libin85 I set Linking back to ‘Link Assemblies only’ I was going try to resolve this issue so Ill update you when I have a had a go at this again. Thanks
@Stratosf Like this: