I need to over come below error. I am trying to explain steps.
I have created new blank solution in VS 2017.
- Later I have added a new Asp.net Core Web Application.
- Also added a new class library under same solution.
- Till then both of these projects are building successfully. I am able to set Web Application as start project, and browse the same.
- Later as soon as I have added reference to new class library dll into web application - added using at top of controller class, then tried to call simple method of new class library - it started giving below error on build of web application code.
error CS0012: The type 'Object' is defined in an assembly that is not referenced. You must add a reference to assembly 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.
1>Done building project "XXXXX.csproj" -- FAILED.