Predefined type 'System.Object' is not defined or imported .net 4.6
I run dotnet restore
command on Package manager console and problem solved.
This wasted lot of my time. Close the visual studio. Delete the .vs folder and restart visual studio. Everything should work fine.
Usually this happens when you change branches or merge branches.
I had the same problem. I spent two days trying to resolve this problem. I tried reinstalling Visual Studio, cleared Visual Studio cache, uninstalled Visual Studio or setup Windows 10 again => but with no success.
You can try follow steps which worked for me:
- Close Visual Studio
- Delete the
packages
folder in Solution folder - Open Visual Studio and rebuild solution
Good luck
Remove bin
and obj
and rebuild.