Forum Cross Platform with Xamarin
We are excited to announce that the Xamarin Forums are moving to the new Microsoft Q&A experience. Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

We encourage you to head over to Microsoft Q&A for .NET for posting new questions and get involved today.

Updated to latest Xamarin Forms and now I am getting strange build errors

:XamlC error XFC0000: Cannot resolve type "Shell"
:XamlC error XFC0000: Cannot resolve type "ContentPage"

what the heck is going on????

Answers

  • JarvanJarvan Member, Xamarin Team Xamurai
    edited June 18

    Updated to latest Xamarin Forms and now I am getting strange build errors

    Which version did you update to the latest version? Did you try to empty the obj and bin folder of the shared project and each platform project. Try to update the nuget package of each platform project to the lastest version.

  • jwoestejwoeste Member ✭✭

    I have the exact same issue as sisaacks.

    I have these errors constantly and VS seems a bit flakey but generally it is business as usual (just need to try to ignore those errors)...

    I have been able to reproduce the error in a generally available project - sfEval from syncfusion. Works well initially - then upgrade the NuGets (specifically Xamarin forms). Then you will start to see similar behaviour in that project.

  • devhelperdevhelper Member ✭✭
    edited June 18

    ** Reported on Github /xamarin/Xamarin.Forms/issues/11101
    Upgraded to Xamarin.Forms to version 4.7.0.968 then the above errors start showing.. When downgraded to version 4.6.0.967 they disappeared..

    Tried Cleaning solution and rebuilding, deleting certain folders, and restarting IDE not helped.

    No impact on build but little bit annoying...

    All these things are in VS 2019

  • sisaackssisaacks Member ✭✭✭

    @devhelper i have found the same as you did....just annoying....it seems like there is something that breaks with every update...weather is the android or ios platform, visual studio or 3rd party controls

  • JarvanJarvan Member, Xamarin Team Xamurai

    I updated the nuget package to lastest version and also faced the errror. In my case, this error seems to occur when there is a syntax error in the xaml file. Though we correct the code, the error will not disappear automatically. It doesn't affect the compilation of the project , which is just an intellisense error.

    Someone encountered the similar problem and has reported it on github, you could follow up the topic.

  • devhelperdevhelper Member ✭✭

    @sisaacks said:
    @devhelper i have found the same as you did....just annoying....it seems like there is something that breaks with every update...weather is the android or ios platform, visual studio or 3rd party controls

    I notice them only when I use Shell..

  • vmetodievvmetodiev Member ✭✭

    Copy-paste brought me here...

  • mark222mark222 Member

    close VS2019 and delete the content of bin and obj folders then open the project and build solution , everything will be ok

  • sisaackssisaacks Member ✭✭✭

    @mark222
    I have closed visual studio
    I have deleted bin files as well as obj files
    I have restarted my computer
    I have done everything I can think of...they always come back.
    I even uninstalled an reinstalled visual studio.
    If I downgrade Xamarin forms to the previous version they go away.

  • JarvanJarvan Member, Xamarin Team Xamurai

    The error doesn't affect the compilation of the project, it is just an intellisense error. Someone encountered the similar problem and has reported it on github, you could follow up the topic.

  • sisaackssisaacks Member ✭✭✭

    @Jarvan yeah i saw someone had posted that after I did......thank you though. I guess stepping into the App world I didn't realize how frustrating it would be with everything constantly changing....and breaking :)

  • JarvanJarvan Member, Xamarin Team Xamurai
    edited June 23

    The issue was reported to product team, please wait for the new version's release.

  • sisaackssisaacks Member ✭✭✭

    @Jarvan yes I understand.....just seems like I am fighting more bugs from updates than I am getting development done.

  • l4ndyl4ndy Member ✭✭

    Is everyone here with this problem using any syncfusion plugins? I was and upgrading to the latest syncfusion version resolved all the XamlC error XFC0000 errors for me

  • sisaackssisaacks Member ✭✭✭

    I am using Syncfusion Controls........that we purchased from syncfusion.

  • l4ndyl4ndy Member ✭✭

    @sisaacks said:
    I am using Syncfusion Controls........that we purchased from syncfusion.

    upgrade to latest version

  • sisaackssisaacks Member ✭✭✭

    @I4ndy I am on the most updated version of syncfusion

  • l4ndyl4ndy Member ✭✭

    @sisaacks said:
    @I4ndy I am on the most updated version of syncfusion

    Oh sorry, have you checked all syncfusion installs for each project are updated? I was using SFAutoComplete which was causing my issue, maybe there might be issues with some of the other plugins that havent yet been updated, might be worth asking on the syncfusion support if they know if the issue is related to the plugins you are using

  • sisaackssisaacks Member ✭✭✭

    @l4ndy yes....I use the nuget package manager.....this error appears on every file in my project

  • sisaackssisaacks Member ✭✭✭

    Even files that have no sycfusion controls have this error Severity Code Description Project File Line Suppression State
    Error : XamlC error XFC0000 : Cannot resolve type "Application"

  • sisaackssisaacks Member ✭✭✭

    Error: XamlC error XFC0000 : Cannot resolve type "Shell".
    Error: XamlC error XFC0000 : Cannot resolve type "ContentPage".
    Error: XamlC error XFC0000 : Cannot resolve type "Application".

  • l4ndyl4ndy Member ✭✭

    @sisaacks said:
    Error: XamlC error XFC0000 : Cannot resolve type "Shell".
    Error: XamlC error XFC0000 : Cannot resolve type "ContentPage".
    Error: XamlC error XFC0000 : Cannot resolve type "Application".

    Yeah I was getting the exact same error messages after upgrading to the latest xamarin.forms. They went after upgrading SFautocomplete. try asking on syncfusion support about the SF packages you are using. But if its not effecting your project at all, I would just wait for an update to xamarin.forms which should resolve this issue.

  • sisaackssisaacks Member ✭✭✭

    I removed the nuget packages and reinstalled and now the errors are gone.......i swear every time they update something they break something. Every new control I have used, I have found at least one bug....but usually more than one.

  • l4ndyl4ndy Member ✭✭

    @sisaacks said:
    I removed the nuget packages and reinstalled and now the errors are gone.......i swear every time they update something they break something. Every new control I have used, I have found at least one bug....but usually more than one.

    It can feel like that sometimes, dont let it get you down. But great that you fixed it, mention which packages you have removed and re-installed so the next person that comes along can get this sorted quickly

  • sisaackssisaacks Member ✭✭✭

    @l4ndy I uninstalled all Nuget Packages associated with syncfusion controls and then reinstalled.
    The errors have yet to return......yet is the optimal word :)

  • sisaackssisaacks Member ✭✭✭

    @l4indy well....it worked for about an hour...now they are all back again.
    So that did not work for me...I only see these errors when building in debug mode

  • sisaackssisaacks Member ✭✭✭

    I submitted a trouble ticket to Syncfusion...I am not sure where the issue is....Xmarin or Syncfusion......but upgrading did make them go away for about 15 minutes then they surely came back.

  • l4ndyl4ndy Member ✭✭

    @sisaacks said:
    I submitted a trouble ticket to Syncfusion...I am not sure where the issue is....Xmarin or Syncfusion......but upgrading did make them go away for about 15 minutes then they surely came back.

    yep mine came back after reboot as well. We might have to just wait for a xamarin.forms update to solve it once and for all.

    I have now updated my xamarin.essentials nuget package to the latest version and they have gone again and not come back even after a reboot, fingers crossed.

  • sisaackssisaacks Member ✭✭✭

    @I4ndy sigh......the saga continues

  • JarvanJarvan Member, Xamarin Team Xamurai
    edited June 26

    I submitted a trouble ticket to Syncfusion...I am not sure where the issue is....Xmarin or Syncfusion......but upgrading did make them go away for about 15 minutes then they surely came back.

    If you are not using the specified function of the Xamarin.Forms 4.7, downgrade to the version 4.6 to avoid the intellisense error.

  • onyxtacularonyxtacular Member ✭✭

    @mark222 said:
    close VS2019 and delete the content of bin and obj folders then open the project and build solution , everything will be ok

    Worked for me.

  • sha4websha4web Member ✭✭

    @jwoeste said:
    I have the exact same issue as sisaacks.

    I have these errors constantly and VS seems a bit flakey but generally it is business as usual (just need to try to ignore those errors)...

    I have been able to reproduce the error in a generally available project - sfEval from syncfusion. Works well initially - then upgrade the NuGets (specifically Xamarin forms). Then you will start to see similar behaviour in that project.

    This is working fine -- Just upgrade the NuGets (Xamarin forms).

  • icamnicamn Member

    This issue was fixed in the update 4.7.0.1080. Just update the Xamarin.Forms plugin to 4.7.0.1080 or later

  • EduardoSibataEduardoSibata USMember ✭✭
    edited October 21

    I've just made what @mark222 says and it's working now, but it's very anoying.
    Closing visual studio, deleting all the bin folders of main and specific projects and the obj folder from solution folder, apparently solve the problem.

Sign In or Register to comment.