Xamarin.Forms - InitializeComponent doesn't exist when creating a new page

前端 未结 30 2274
不知归路
不知归路 2021-01-30 12:36

I\'m using Visual Studio to try out Xamarin.Forms. I\'m trying to follow the guide: http://developer.xamarin.com/guides/cross-platform/xamarin-forms/xaml-for-xamarin-forms/getti

相关标签:
30条回答
  • 2021-01-30 13:01

    It appears this is caused by many things so if you've read all of these and haven't resolved it yet:

    Mine was caused by the Solution Configuration being set to Release. Changed to Debug and error resolved.

    0 讨论(0)
  • 2021-01-30 13:01

    add using Xamarin.Forms.Xaml

    tested on Visual Studio 2017

    0 讨论(0)
  • 2021-01-30 13:02

    Check page text x:Class="AppName.Page1". AppName must be your app name

    0 讨论(0)
  • 2021-01-30 13:02

    I had a caching issue when I encountered this error.

    To get this fixed, simply uninstall last version of Xamarin.Forms package and reinstall a previous working version.

    When the rebuild is successful, then update the package again to the latest version.

    0 讨论(0)
  • 2021-01-30 13:03

    Updating the Xamarin.Forms NuGet package should do the job

    0 讨论(0)
  • 2021-01-30 13:03

    Change Page properties to :

    BuildAction => Embedded resource 
    CustomTools => MSBuild:UpdateDesignTimeXaml
    
    0 讨论(0)
提交回复
热议问题