How to fix Incomprehensible error in the whole of my application?

sblb 996 Reputation points


some time ago I made a blazor wasm .net core 6 application with VS version 17.2.3 and it works fine.

However I opened the code today and I find myself with "red" everywhere, see the image below.

Is this a problem with the VS version?

Thanks in advance!!

A free and open-source web framework that enables developers to create web apps using C# and HTML being developed by Microsoft.
983 questions
Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
3,173 questions
{count} votes

Accepted answer
  1. Ali Benchaaban 85 Reputation points

    Predefined type 'type' is not defined or imported

    The main cause for this problem is that the project is not importing mscorlib.dll, which defines the entire System namespace. This can be caused by one of the following:

    • The NoStandardLib option from the command line compiler has been specified. The NoStandardLib option prevents the import of mscorlib.dll. Use this option if you want to define or create a user-specific System namespace.
    • An incorrect mscorlib.dll is referenced.
    • A corrupt Visual Studio .NET or .NET Framework common language runtime installation exists.
    • Residual components from an earlier installation that are incompatible with the latest installation remain.

    To resolve this problem, take one of the following actions:

    0 comments No comments

2 additional answers

Sort by: Most helpful
  1. sblb 996 Reputation points


  2. sblb 996 Reputation points

    you will find error message

    User's image

    0 comments No comments