0
votes

I'm working on a Xamarin forms app and i am using fresh MVVM framework. i added a button to a ContentPage that needs to open a new page.

the following error is:

System.Exception: 'Bux_Management.Pages.JournalsOverviewPage, Bux Management, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null not found'

my button in Xaml

<Button Text="Go to journal overview page" Command="{Binding ShowJournalOverviewPage}"/>

my command in my PageModel which inherits from FreshBasePageModel

        public Command ShowJournalOverviewPage
        {
            get
            {
                return new Command(async () => {
                    await CoreMethods.PushPageModel<JournalsOverviewPageModel>(null);
                });
            }
        }

my page models are in de folder "PageModels" and they inherit from "FreshBasePageModel" my pages are in the folder "Pages" and they inherit from "ContentPage"

Thanks in advance,

1
I believe that page and pagemodel must be under the same namespace - FabriBertani
await CoreMethods.PushPageModel<JournalsOverviewPageModel>(); ? - Shaw
Can you post a screenshot about your page and pagemodel class list? - Shaw

1 Answers

0
votes

Yes indeed it was a problem with the namespaces, first i used ViewModels and View as folders and changed it later to PageModel and Pages