Quantcast
Channel: ASP.NET Core
Viewing all articles
Browse latest Browse all 9386

VS 2017 ASP.NET CORE WEB Application - adding reference to external class library giving error

$
0
0

I need to over come below error. I am trying to explain steps.

I have created new blank solution in VS 2017.

  1. Later I have added a new Asp.net Core Web Application.
  2. Also added a new class library under same solution.
  3. Till then both of these projects are building successfully. I am able to set Web Application as start project, and browse the same.
  4. 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.


Viewing all articles
Browse latest Browse all 9386

Trending Articles