Predefined type 'System.Object' is not defined or imported .net 4.6

后端 未结 12 1226
别那么骄傲
别那么骄傲 2021-02-06 20:02

I\'m using MVC 5 and .net 4.6 to create a web API that my mobile app can connect too.

Whenever I build the project I get hundreds of errors telling me that I need to add

12条回答
  •  悲哀的现实
    2021-02-06 21:02

    Took almost 2 days to fix. Tried VS Uninstall\re-install several times but did not work.

    What finally worked for me...

    Ran VS Installer repair. Due to errors, I had to manually uninstall all instances MS .NET Core SDK - 2.1xxx

    Ran VS Installer repair. No errors. Remove bin and obj and rebuild.

    Ran dotnet restore command on Package manager console and problem solved.

提交回复
热议问题