Base solution for your next web application
Open Closed

Problem with app after build #12326


User avatar
0
[email protected] created

Good day,

I hope this email finds you well.

We are stuck on the following issue, just wondering if you may have an idea of what could be the cause. The app was running and building successfully without any issues, this error just popped up. The solutions still build successfully, the problem is when we run the app.

Please have a look at this and see if there is anything that could be done to fix this.

Error:

This is the innerException we get:

Could not resolve type with token 0100020c from typeref (expected class 'Microsoft.Maui.Graphics.Platform.GraphicsExtensions' in assembly 'Microsoft.Maui.Graphics, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null')

This is the stack trace, nothing descriptive, it is just a path at Microsoft.Maui.Controls.Button..cctor() in /_/src/Controls/src/Core/Button/Button.Mapper.cs:line 19

Markdown is supported
Copy & paste or drag & drop images (max 30 MB per image)

1 Answer(s)
  • User Avatar
    0
    m.aliozkaya created
    Support Team

    Hi @[email protected],

    What is your product version? This typically happens when there is a mismatch between the versions of the assemblies being referenced or when the required assembly is not properly loaded or available.

    Check your .csproj file and update all MAUI-related packages to the same version.

    <PackageReference Include="Microsoft.Maui.Controls" Version="x.x.x" /> <PackageReference Include="Microsoft.Maui.Graphics" Version="x.x.x" />

    Then;

    • Go to Build > Clean Solution.
    • Then, go to Build > Rebuild Solution.
    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)