Forum Visual Studio

Predefined type 'System.Object' is not defined or imported ERROR.

KesWalkerKesWalker Member ✭✭

in Visual Studio 2019, randomly, multiple times a day, I will get this error along with namespace name 'example' could not be found for every namespace I'm importing. This is what it looks like:

I've tried:

  • cleaning & rebuilding the project.
  • deleting the bin & obj folders.
  • running dotnet restore in the PM console.
  • updating VS.
  • reinstalling all nuget packages.

Reinstalling all nuget packages removes the Predefined type 'System.Object' is not defined or imported error until I try building the project again.

Sign In or Register to comment.