rotorgames / Rg.Plugins.Popup

Xamarin Forms popup plugin
MIT License
1.15k stars 336 forks source link

XamlC error XFC0000: Cannot resolve type #738

Open Gi4nfratti opened 2 years ago

Gi4nfratti commented 2 years ago

🔙 Regression

I had a project in Xamarin Forms working perfectly. Now I'm trying to migrate it to .Net Maui, but when I download Rg.Plugins.Popup in NuGet Packages and compile my project, I get the error:

1>App.xaml : error :  : XamlC error XFC0000 : Cannot resolve type "Application".
1>AppShell.xaml : error :  : XamlC error XFC0000 : Cannot resolve type "Shell".
1>AppShell.xaml : error :  : XamlC error XFC0000 : Cannot resolve type "Shell".
1>MainPage.xaml : error :  : XamlC error XFC0000 : Cannot resolve type "ContentPage".
1>MainPage.xaml : error :  : XamlC error XFC0000 : Cannot resolve type "ContentPage".
1>Resources\Styles\Colors.xaml : error :  : XamlC error XFC0000 : Cannot resolve type "ResourceDictionary".

Notice that, for example, I don't use any Popup in App.xaml:

 <Application xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             xmlns:local="clr-namespace:MyProject"
             x:Class="MyProject.App">
    <Application.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="Resources/Styles/Colors.xaml" />
                <ResourceDictionary Source="Resources/Styles/Styles.xaml" />
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </Application.Resources>
</Application>

Old (and correct) behavior

Working when I download and use it.

Current behavior

Gets XamlC error XFC0000: Cannot resolve type error.

Reproduction steps

Clean and rebuild the solution; Reinstall Rg.Plugins.Popup; Add this to my .csproj:

<ItemGroup>
    <EmbeddedResource Remove="**/*.xaml" />
</ItemGroup>

None of that steps solved the problem.

Djixify commented 2 years ago

I believe it is being worked on (?) as indicated from the branch: https://github.com/rotorgames/Rg.Plugins.Popup/tree/Maui-Compatibility

But it has been a while and now MAUI is just about ready for release, then it is more relevant to get the compatible version out?

If it is required to be added fast, then I suggest taking a look at the branch and including it in your project, at the same time this might help out finding any issues that might be between now and the preview release the branch was made for.

Djixify commented 2 years ago

I believe it is being worked on (?) as indicated from the branch: https://github.com/rotorgames/Rg.Plugins.Popup/tree/Maui-Compatibility

But it has been a while and now MAUI is just about ready for release, then it is more relevant to get the compatible version out?

If it is required to be added fast, then I suggest taking a look at the branch and including it in your project, at the same time this might help out finding any issues that might be between now and the preview release the branch was made for.

Upon further inspection, the compatibility branch is not even close to finished and multiple things had changed from the preview version it was made for and now. I would suggest looking for alternatives till further updates are made.

LuckyDucko commented 2 years ago

@Djixify @Gi4nfratti

Maui Support is android only right now https://github.com/rotorgames/Rg.Plugins.Popup/issues/684#issuecomment-1152908103