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

后端 未结 12 1229
别那么骄傲
别那么骄傲 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:53

    In my case, this is different. First check System.Runtime reference is added to your project or not. If it is added to your project, please follow the below steps.

    1. Open your Reference from your project and select System.Runtime assembly.
    2. Right click on System.Runtime and select property.
    3. Change the value of SpecificVersion from False to True.

    Note : In my Case I am using Visual Studio 2019 and Project Framework Version - 4.6.2

提交回复
热议问题