2

Visual Studio 2017 Asp.Net Core project doesn't copy dependent dll file on build into bin folder. That happens only on publish.

Before .Net Core I can "Copy local" dependent dll.

How can I explain to Visual Studio that it should copy nuget package dll into bin folder?

Packages

Package options

Eric Pohl
  • 2,324
  • 1
  • 21
  • 31
Valery Yegorov
  • 171
  • 1
  • 11

1 Answers1

3

Please open your csproj file on any text editor outside Visual Studio.

You can see next lines of code:

<PropertyGroup>
  <TargetFramework>netcoreapp2.0</TargetFramework>      
</PropertyGroup>

Just change the PropertyGroup section as:

<PropertyGroup>
  <TargetFramework>netcoreapp2.0</TargetFramework>
  <CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
</PropertyGroup>

More details you can review here and here.

Alexander I.
  • 2,380
  • 3
  • 17
  • 42