Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No embeddedresource found for App.<basepage> #67

Open
mwasim opened this issue Oct 30, 2018 · 20 comments
Open

No embeddedresource found for App.<basepage> #67

mwasim opened this issue Oct 30, 2018 · 20 comments

Comments

@mwasim
Copy link

mwasim commented Oct 30, 2018

Hi there, I reported this issue couple of weeks ago on the https://gitter.im/LiveXAML/Lobby

Now, I'm able to reproduce this issue as below, (It looks like it throws this error when we use the nested base page)

1). Create a new basic/blank Xamarin.Forms App (.NET standard)
2). Create a simple base page class as below,

public class BasePage : ContentPage
    {        
        public BasePage()
        {                        
        }
    }

2.1). Create another base page, which should inherit from the above base page,

<?xml version="1.0" encoding="utf-8" ?>
<app2:BasePage xmlns="http://xamarin.com/schemas/2014/forms"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             xmlns:app2="clr-namespace:App2;assembly=App2"
             x:Class="App2.BaseScrollViewPage"/>

3). Now change the MainPage.xaml as below (it uses the BaseScrollViewPage instead of ContentPage)

<?xml version="1.0" encoding="utf-8" ?>
<local:BaseScrollViewPage xmlns="http://xamarin.com/schemas/2014/forms"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             xmlns:local="clr-namespace:App2"
             x:Class="App2.MainPage">

    <ScrollView>
        <StackLayout>
            <!-- Place new controls here -->
            <Label Text="Hello World!" 
                   HorizontalOptions="Center"
                   VerticalOptions="CenterAndExpand" />
        </StackLayout>
    </ScrollView>
</local:BaseScrollViewPage>

4). Ensure LiveXAML VS extension and nuget packages are installed. Run the app, and try changing the text "Hello World!" to something else. it shows the error below,

**"LiveXAML error

No embeddedresource found for App.BaseScrollViewPage"**

Can this issue be fixed in the next update please?

@ionoy
Copy link
Contributor

ionoy commented Oct 30, 2018

Hi @mwasim

Thanks for the report! I have already fixed this issue and will release the update soon. There is some other stuff that needs to be resolved yet.

@GiampaoloGabba
Copy link

GiampaoloGabba commented Nov 2, 2018

Nice! I was ready to make a repro of this bug but then i saw this Issue. This is exactly the problem i faced.
Thank you @ionoy for the upcoming fix :)

@mwasim
Copy link
Author

mwasim commented Nov 6, 2018

Hi @ionoy, I'm no longer able to reproduce this issue, and it seems to be fixed in the latest nuget package release (2.1.45).

Thank you!

@ionoy
Copy link
Contributor

ionoy commented Nov 6, 2018

Awesome!

@ionoy ionoy closed this as completed Nov 6, 2018
@mwasim
Copy link
Author

mwasim commented Dec 10, 2018

Hi @ionoy,

FYI, this issue has come back again in the latest LiveXAML update. I tried downgrading nuget packages but it doesn't help.

Could you please fix this bug in the next update?

@ionoy ionoy reopened this Dec 10, 2018
@ionoy
Copy link
Contributor

ionoy commented Dec 10, 2018

@mwasim Actually, I can't reproduce it with the same steps now. Can you try it on your end?

@mwasim
Copy link
Author

mwasim commented Dec 11, 2018

Hi @ionoy, yes sorry I didn't test these simple steps, it's not reproducible with steps above.

Actually, I'm facing this issue on a complex page using BasePage and multiple custom controls. On testing again, I found it throws the error against a ContentView based control on the page (like below example). I removed that control and then, as I made simple text changes on the page, it started showing error "object reference not set".

Now it throws the error as below,

"LiveXAML error

No embeddedresource found for App.Controls.ContentViewBaseControl"

I'm trying to recreate this bug in a simple project with some simple steps. As I'll be able to find some simple steps to reproduce this bug, I'll let you know. Thanks

@matteopiccioni
Copy link

I had the same problem with 2.1.6.3 version,
I roll back to version 2.1.5.9 and it works

So I try again to update to 2.1.6.3 and now it give me error "Exception has been thrown by the target of an invocation. No embeddedresource found for .....class"

Then I roll back again to 2.1.5.9 and now it works again

I am using Prism, an external ResourceDictionary files and in my App.xaml file I have:

<?xml version="1.0" encoding="utf-8"?>
<prism:PrismApplication
..
   <Application.Resources>
        <ResourceDictionary MergedWith="styles:Globale">               
            <local:InvertBooleanConverter x:Key="InvertBooleanConverter" />
        </ResourceDictionary>
   </Application.Resources>    
</prism:PrismApplication>

@leo-mck
Copy link

leo-mck commented Feb 14, 2019

I am having this exactly same problem. If I directly change a xaml page it works, but if I change a resource defined on app.xaml, I get this error.

And even when it works, after a change, I cannot navigate to other screens, nothing happen.

On 2.1.5.9 I get other error: "Master and Detail must be set before adding MasterDetailPage to a container" but I can navigate out and back to see the changes.

I also use prism.

@roubachof
Copy link

roubachof commented Feb 21, 2019

Same issue as @matteopiccioni It works only on 2.1.59, 2.1.63 is failing on everypage reloading with "No embeddedresource found for .....class"

I don't use prism.
And I have vanilla ContentPage.

@nolanlater
Copy link

I have the same issue as @leo-mck and @roubachof. I am using prism and also had to revert back to 2.1.59 from 2.1.68. Every page reload results in "No embedded resource found for x class" along with "Master and Detail must be set before adding...".

@GiampaoloGabba
Copy link

Getting the same error with TabbedPage (among other things like custom controls, ecc..). The only way to get updates is to revert to 2.1.59

@francis2
Copy link

Same as tnolan2 here

@balbarak
Copy link

balbarak commented Feb 24, 2019

I have same issue any update ?

on

Xamarin.Forms 3.5.0.1699047

@ionoy
Copy link
Contributor

ionoy commented Feb 27, 2019

Please try the latest update (2.1.70) which addresses this issue.

Thanks!

@francis2
Copy link

Works for me--thanks!

@mwasim
Copy link
Author

mwasim commented Mar 14, 2019

Yes it's working fine now, and the issue is no longer reproducible. Thank you!

@sethom
Copy link

sethom commented May 4, 2019

I'm having this issue in Visual Studio for Mac using xamarin.forms 3.6.0.344457 and LiveXAML 2.1.72: "No embedded resource found for MyApp.Controls.SegmentedControl". If I remove the segmented control reference from xaml I just get an all new error for another xaml view: "No embeddedresource found for MyApp.HomeViewOverlay."

This seems to happen to any page in my project.

When I downgrade to 2.1.63 (and downgrade Xamarin.Forms) which was what I was using before Visual Studio 2019 for Mac was released, everything works again.

@sethom
Copy link

sethom commented May 4, 2019

One more thing, I'm doing this in a PCL 4.5 - Profile111 project. Not sure if that matters.

@sethom
Copy link

sethom commented May 4, 2019

Oh, forgot to mention. I'm not using Prism. Using Caliburn.Micro.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants