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

后端 未结 12 1228
别那么骄傲
别那么骄傲 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 20:59

    In my case, below are the steps I followed;

    1. I removed bin and obj and rebuild. (Didn't work)
    2. Unloaded the project. (It resulted in "Assets file project.assets.json not found. Run a NuGet package restore")
    3. I ran dotnet restore command via Visual Studio 2017 >> Tools >> NuGet Package Manager >> Package Manager Console.
    4. Rebuild solution. (Problem solved)

提交回复
热议问题