How to convert existing solution to use Shell

Lloyd Sheen 1,331 Reputation points
2023-01-31T14:51:43.6833333+00:00

I have a solution that does not use Shell. I would like to change it so that it uses shell. I created a new solution and copied the AppShell.xaml and .cs. I changed the namespace to the correct namespace. I then changed the app.xaml.cs to:

            //MainPage = new MainPage();
            MainPage = new AppShell();

Now in the AppShell.xaml.cs there is an error that InitializeComponent(); does not exist in the current context. No amount of cleaning , deleting the bin/obj folders will fix this.

Is there a way to start using shell in a project that has not used it up until now?

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
2,589 questions
{count} votes