building simple MAUI app causes an error

Tariq Roshan 0 Reputation points
2024-05-06T22:11:05.73+00:00

Type "Shell" was not found. Verify ....

It is literrally the first line in AppShell.xaml.

I have just created a new application and not edited any pages. The defult pages should be correct and buildable in sample app.

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
2,962 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Yonglun Liu (Shanghai Wicresoft Co,.Ltd.) 36,871 Reputation points Microsoft Vendor
    2024-05-07T02:28:09.4166667+00:00

    Hello,

    This is a known issue in GitHub XLS0414: The type ' ' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been build. #7192. According to the workaround in this issue, you can resolve this issue by cleaning and rebuilding the solution.

    For some reason it needed a couple of Clean SOlution and rebuilds and now it works

    If this problem still occurs, you can try the following methods:

    • Update Nuget Packages in the project.
    • Check whether the MAUI component has been installed in VS.

    Best Regards,

    Alec Liu.


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments