Forum Xamarin Xamarin.Forms

Value cannot be null. Parameter name: type

Not sure what changed, but now when I build I get this error on every XAML file in my project. Has anyone ran into this issue before? Tried all of the usual fixes - del bin/obj, restart, clean rebuild, downgrade Forms...

Answers

  • JasonFox.2139JasonFox.2139 USMember

    Appreciate the response @ClintStLaurent, I hadn't tried building each project individually. Still no go though, same result.

  • MohammadShabanMohammadShaban USMember ✭✭

    did you manage to solve it?

  • MohammadShabanMohammadShaban USMember ✭✭

    you have 2 choices,
    first: re-create your entire project from scratch, this is painfull
    or
    remove [XamlCompilation(XamlCompilationOptions.Compile)] from all your xaml.cs pages, and it will work

  • GaetanFGaetanF USMember ✭✭✭

    remove [XamlCompilation(XamlCompilationOptions.Compile)] from all your xaml.cs pages, and it will work

    This only hides the sh*t under the carpet, excuse me the expression.

  • ClintStLaurentClintStLaurent USUniversity ✭✭✭✭✭

    Wish I could give you 100 likes for that @GaetanF

  • GreekTreatGreekTreat Member ✭✭

    @ClintStLaurent said:
    Clean the solution
    Close it
    delete the bin and obj directories from each project
    Reopen the solution.
    Build each project individually - NOT rebuild solution
    After all the projects are built... Then Rebuild Solution

    Thank you, it worked for me!!!

  • AmerAlfaqeehAmerAlfaqeeh SAMember ✭✭

    @lClintStLaurent

    June 2018
    Clean the solution
    Close it
    delete the bin and obj directories from each project
    Reopen the solution.
    Build each project individually - NOT rebuild the solution
    After all the projects are built... Then Rebuild Solution

    Thank You.......... work fine 100%

  • SheemuSheemu USMember ✭✭✭

    @ClintStLaurent said:
    Clean the solution
    Close it
    delete the bin and obj directories from each project
    Reopen the solution.
    Build each project individually - NOT rebuild solution
    After all the projects are built... Then Rebuild Solution

    it was working for me.

  • AlejandroRmzAlejandroRmz USUniversity ✭✭
    edited December 2019

    I found out that newly created XAML files were being set as "Build Action = Embedded Resource", I changed all of them to "Build Action = Page" and that fixed the problem for me :smile:

  • DamianMehersDamianMehers CHBeta ✭✭
    edited January 13

    I got this error when using "x:dataType" in a Tizen app.

  • princepotemkinprincepotemkin Member ✭✭

    If in doubt ... a) build, clean, re-compile . If that fails - then .. clean, build, re-compile. If this fails, then re-compile, clean, build or .. alternatively re-compile, build, clean. If all of THAT doesn't work, then repeat from a) above until you grow old, get arthritis in your fingers and can longer work the keyboard and/or mouse

  • mGuibmGuib Member

    @AmerAlfaqeeh said:
    @lClintStLaurent

    June 2018
    Clean the solution
    Close it
    delete the bin and obj directories from each project
    Reopen the solution.
    Build each project individually - NOT rebuild the solution
    After all the projects are built... Then Rebuild Solution

    It worked great here, thanks!
    The steps I did was just close the application and delete the directories, open the project again and make a Rebuild Solution

  • Glorious18Glorious18 Member ✭✭✭

    Severity Code Description File Project Line Suppression State
    Error style attribute 'attr/windowNoTitle (aka com.mykpaonline.mykpaonsite:attr/windowNoTitle)' not found. C:\CompuChemApps\CompuChemStoichio\CompuChemApp\CompuChemApp\CompuChemApp.Android\Resources\values\styles.xml CompuChemApp.Android 2

Sign In or Register to comment.