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

sblb 1,166 Reputation points
2023-03-23T13:03:19.51+00:00

Hi,

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!!

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

Accepted answer
  1. Ali Benchaaban 85 Reputation points
    2023-03-24T11:59:08.24+00:00

    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 1,166 Reputation points
    2023-03-23T20:47:16.9033333+00:00

    Capture


  2. sblb 1,166 Reputation points
    2023-03-24T11:56:11.5433333+00:00

    you will find error message

    User's image

    0 comments No comments