.NET 标准库和框架项目:"Could Not Get Dependencies for Project Reference "
.NET Standard Library && Framework Project: "Could Not Get Dependencies for Project Reference "
我的解决方案包含 15 个库(13 个 .NET Standard 2.0.2 和 2 个 Framework 4.7.1)和 7 个使用 Framework 4.7.1 的 Web 项目
使用 Framework 4.7.1 的 2 个库都按预期工作,有引用和查找依赖项(它们全部封装为自己的,因此不需要对任何 .NET Standard 库的任何依赖项)
为了解决这个问题,我试过:
将一个库隔离到不需要任何依赖另一个 .net 库的地方(仍然会产生问题)
添加
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects> <GenerateBindingRedirectsOutputType>true</GenerateBindingRedirectsOutputType> <RestoreProjectStyle>PackageReference</RestoreProjectStyle>
我似乎无法解决错误,有什么建议吗?
提前感谢所有回复
我用空模板创建了一个新的 Web 应用程序并移动了 files/references/dependencies/web.config/etc,这有助于解决我的问题。并重建解决方案。
据我估计,问题可能在于它是经典网站,因为该版本对 MSBuild 的支持有限。
我的解决方案包含 15 个库(13 个 .NET Standard 2.0.2 和 2 个 Framework 4.7.1)和 7 个使用 Framework 4.7.1 的 Web 项目
使用 Framework 4.7.1 的 2 个库都按预期工作,有引用和查找依赖项(它们全部封装为自己的,因此不需要对任何 .NET Standard 库的任何依赖项)
为了解决这个问题,我试过:
将一个库隔离到不需要任何依赖另一个 .net 库的地方(仍然会产生问题)
添加
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects> <GenerateBindingRedirectsOutputType>true</GenerateBindingRedirectsOutputType> <RestoreProjectStyle>PackageReference</RestoreProjectStyle>
我似乎无法解决错误,有什么建议吗?
提前感谢所有回复
我用空模板创建了一个新的 Web 应用程序并移动了 files/references/dependencies/web.config/etc,这有助于解决我的问题。并重建解决方案。
据我估计,问题可能在于它是经典网站,因为该版本对 MSBuild 的支持有限。