I am getting this build error after adding assembly reference(xyz.dll) in .Net Core 1.1 console application.

The type 'Object' is defined in an assembly that is not referenced. You must add a reference to assembly 'mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.

Here are the details of my ConsoleApp.csproj.

<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <OutputType>Exe</OutputType>
    <TargetFramework>netcoreapp1.1</TargetFramework>
  </PropertyGroup>

  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
    <PlatformTarget>AnyCPU</PlatformTarget>
  </PropertyGroup>

  <ItemGroup>
    <Reference Include="xyz">
      <HintPath>bin\Debug\netcoreapp1.1\xyz.dll</HintPath>
    </Reference>
  </ItemGroup>

</Project>

I am using Visual Studio Professional 2017 version 15.3.2 .

I have also created console app targeting to .NET 4.5.2, included xyx.dll reference and it worked with no issues.

0

There are 0 best solutions below