问题描述:
创建.net framework 项目、.net standard 项目(我还在.net standard 项目中引用了 nuget 包)。在.net framework 项目种引用.net standard 项目后,执行调试,提示找不到引用的 nuget 包。
解决方案:
在 .net framework 项目的工程文件(csproj)中配置(添加到 <PropertyGroup> 节点中):
<RestoreProjectStyle>PackageReference</RestoreProjectStyle>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
注:.net framework 项目 引用 .net standard 项目 得 framework 4.6.1版本以上