Visual Studio 2017 Asp.Net Core项目不会将构建中的依赖dll文件复制到bin文件夹中。这只发生在发布上。
在.Net Core之前我可以“复制本地”依赖的dll。
如何向Visual Studio解释它应该将nuget包dll复制到bin文件夹中?
请在Visual Studio外的任何文本编辑器上打开您的csproj
文件。
您可以看到下一行代码:
<PropertyGroup>
<TargetFramework>netcoreapp2.0</TargetFramework>
</PropertyGroup>
只需将PropertyGroup部分更改为:
<PropertyGroup>
<TargetFramework>netcoreapp2.0</TargetFramework>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
</PropertyGroup>