简体   繁体   中英

Visual Studio 2017 Asp.Net Core project doesn't copy dependent dll file on build

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

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 .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM