Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio For Mac Designer Error

I have downloaded VS For Mac Preview and created a new Xamarin Forms IOS/Android Solution using the portable library. When i try and load the XAML designer though to view the startup page I get the error "Invalid XAML : default constructor not found for Xamarin.Forms.Applicaton". I have not made any changes to the project code generated by VS For Mac and the only thing I did was to build the Android project as this is required before the designer can be opened. I also had to download the latest versions of the Android SDK via the SDK Manager.

Does anyone have any idea what is wrong

Thanks

Steve

like image 812
Steven Price Avatar asked Mar 23 '26 00:03

Steven Price


1 Answers

Firstly, there are two preview modes, one for iOS and one for Android - if you can't see both tabs, drag the frame over a bit. I can't currently get the Android preview to work right even though it builds, but for iOS to work it looks like you simply need to update the Xamarin.Forms package. Go to the 'Project' menu and select 'Update NuGet Packages.' Then, restart Visual Studio for Mac and it should be working. It is very slow to load, however. I had to rebuild my project and select 'Update NuGet Packages' a second time before it actually showed up.

I'm still trying to figure out why Android preview does not work.

like image 70
John Chadwick Avatar answered Mar 24 '26 17:03

John Chadwick



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!