Help Needed: Errors in Initial .NET MAUI Project

Roberto C 120 Reputation points
2024-07-08T01:24:07.06+00:00

I have created my first .NET MAUI project several times, but to my surprise, errors appear without changing any line of code. Although the application runs fine, the lines remain underlined.

I have captured a screenshot so you can see the issue and guide me on what to do in my project to avoid these errors.
ErrorMAUI

Thank you.

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
3,630 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
11,040 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Leon Lu (Shanghai Wicresoft Co,.Ltd.) 76,631 Reputation points Microsoft Vendor
    2024-07-08T03:15:52.1233333+00:00

    First of all, please update your VS version to the latest version. If you get the same issue?

    If still have this issue, please close visual studio, find your project's folder, delete the bin and obj folders, then run visual studio with "run as administrator", open your project will you get the same error?

    If you still have this error, please click the MainPage.xaml, check the build action if it is MauiXaml.

    If you still have this issue, please share your current VS version.

    1 person found this answer helpful.

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.