No embedded resource found

I have an xamarin forms application where on the first page there is an image control that displays an embedded resource. Often, when I launch the application, it does not work when starting with the following error:

[libc] WARNING: generic atexit() called from legacy shared library
[monodroid-gc] GREF GC Threshold: 46800
[MonoDroid] UNHANDLED EXCEPTION:
[MonoDroid] Xamarin.Forms.Xaml.XamlParseException: No embeddedresources found for SeeVee.StartPage
[MonoDroid]   at Xamarin.Forms.Xaml.XamlLoader.Load (Xamarin.Forms.BindableObject view, System.Type callingType) [0x00000] in <filename unknown>:0 
[MonoDroid]   at Xamarin.Forms.Xaml.Extensions.LoadFromXaml[StartPage] (SeeVee.StartPage view, System.Type callingType) [0x00000] in <filename unknown>:0 
[MonoDroid]   at SeeVee.StartPage.InitializeComponent () [0x00000] in <filename unknown>:0 
[MonoDroid]   at SeeVee.StartPage..ctor () [0x00000] in <filename unknown>:0 
[MonoDroid]   at SeeVee.App.GetMainPage () [0x00000] in <filename unknown>:0 
[MonoDroid]   at SeeVee.Android.MainActivity+<OnCreate>d__0.MoveNext () [0x00000] in <filename unknown>:0 
[mono] 
[mono] Unhandled Exception:
[mono] Xamarin.Forms.Xaml.XamlParseException: No embeddedresources found for SeeVee.StartPage
[mono]   at Xamarin.Forms.Xaml.XamlLoader.Load (Xamarin.Forms.BindableObject view, System.Type callingType) [0x00000] in <filename unknown>:0 
[mono]   at Xamarin.Forms.Xaml.Extensions.LoadFromXaml[StartPage] (SeeVee.StartPage view, System.Type callingType) [0x00000] in <filename unknown>:0 
[mono]   at SeeVee.StartPage.InitializeComponent () [0x00000] in <filename unknown>:0 
[mono]   at SeeVee.StartPage..ctor () [0x00000] in <filename unknown>:0 
[mono]   at SeeVee.App.GetMainPage () [0x00000] in <filename unknown>:0 
[mono]   at SeeVee.Android.MainActivity+<OnCreate>d__0.MoveNext () [0x00000] in <filename unknown>:0 
[mono-rt] [ERROR] FATAL UNHANDLED EXCEPTION: Xamarin.Forms.Xaml.XamlParseException: No embeddedresources found for SeeVee.StartPage
[mono-rt]   at Xamarin.Forms.Xaml.XamlLoader.Load (Xamarin.Forms.BindableObject view, System.Type callingType) [0x00000] in <filename unknown>:0 
[mono-rt]   at Xamarin.Forms.Xaml.Extensions.LoadFromXaml[StartPage] (SeeVee.StartPage view, System.Type callingType) [0x00000] in <filename unknown>:0 
[mono-rt]   at SeeVee.StartPage.InitializeComponent () [0x00000] in <filename unknown>:0 
[mono-rt]   at SeeVee.StartPage..ctor () [0x00000] in <filename unknown>:0 
[mono-rt]   at SeeVee.App.GetMainPage () [0x00000] in <filename unknown>:0 
[mono-rt]   at SeeVee.Android.MainActivity+<OnCreate>d__0.MoveNext () [0x00000] in <filename unknown>:0 

I need to rebuild the application in xamarin studio and restart, and it works. Phew! sometimes it’s very tiring. Hope xamarin knows about this stupid mistake and fix it.

+4
source share
3 answers

This is a bug . For some reason its status is RESOLVED FIXED , but it doesn't seem to be fixed at all. On an XS on a Mac anyway.

, , , SomeClass.g.cs, , . , .

, , , .xaml, .

+1

​​, xaml. x: Class .

+1

Visual Studio Community 2017 Mac. char (") (') . , ContentPage .

:

'Visual Studio Community' -> 'Preferences' -> 'Source Code' -> 'Code Formatting' -> 'XML document' -> 'XML Format' -> Quote char

changed it to double quotes, formatted documents that I formatted with single quotes, into double quotes ( 'Edit'->'Format'->'Format Document'), and now it works fine.

This fixed my problem:

'Xamarin.Forms.Xaml.XamlParseException has been thrown'
'No embeddedresource found for YourNamespace.YourContentPageName'

Hope this helps!

0
source

Source: https://habr.com/ru/post/1570822/


All Articles