FreshPageModelResolver fails to Resolve type if "Models" keyword is present on the name space
See original GitHub issueGiving the following example:
namespace Foo.Bar.PageModels
{
public class MyPageViewModel
{
...
}
}
Using var name = type.AssemblyQualifiedName.Replace ("Model", string.Empty);
Will lead into the follow type: Foo.Bar.Pages.MyPageView
witch does not exist.
Issue Analytics
- State:
- Created 8 years ago
- Comments:12 (7 by maintainers)
Top Results From Across the Web
Error on FreshPageModelResolver.ResolvePageModel<>()
It means after replace ViewModel to Page, the name (AssemblyQualifiedName of MainPage) could not get the right type of MainPage. So it thrown ......
Read more >Resolve failed: APageModel - Xamarin.Forms
I am using the new .Net standard type of Xamarin projects. Here is my app.xaml.cs: public App() { InitializeComponent(); MainPage = FreshMvvm.
Read more >Error: The type or namespace name Models does not exist in ...
https://codedocu.com/Details?d=2807&a=9&f=344&l=0 Asp Core Error : The type or namespace name 'ArticleModels' does not exist in the namespace ...
Read more >XAML namespaces - .NET MAUI
There are two XAML namespace declarations that are always within the root element of a XAML file. The first defines the default namespace:....
Read more >The type or namespace name 'System' could not be found
When I try to create a new Xamarin Forms app, nothing works. No imports can be found. Almost every line in the autogenerated...
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
I just ran into a very similiar Problem. If my Pages were not in the same namespace as the pagemodels I got this exception:
More specifically, It does works if both are in the same namespace OR if pages are in a sub-name space “Pages” and page models ins "PageModels.
@Looooooka FreshMvvm now supports ability to use a custom naming convention, see http://www.michaelridland.com/xamarin/announcing-freshmvvm-2-1-and-2-2/