首页 > 解决方案 > ASP.NET 网站项目中的冲突引用

问题描述

由于 Azure.Cosmos 库的存在,我构建了一个依赖 System.Configuration.ConfigurationManager 的 .NET 标准 dll。将所需的 dll 添加到我的 ASP.NET 4.7.2 网站项目时,我收到以下错误:

编译器错误消息:CS0433:“c:\Windows\Microsoft.NET\assembly\GAC_MSIL\System.Configuration\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll”中都存在“System.Configuration.ConfigurationManager”类型和 'c:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\4382976a\ff659097\assembly\dl3\c46cb292\00cb1086_6aa6d601\System.Configuration.ConfigurationManager.DLL'

我已经在互联网上搜索了几个小时,虽然我找到了 Web 应用程序项目的解决方案,但我找不到任何旧网站项目的解决方案。我已经尝试了所有可以找到的建议,包括修改 web.config 设置和 csproj 设置。

任何帮助将不胜感激!

标签: c#asp.netazure-cosmosdb.net-standard-2.0web-site-project

解决方案


推荐阅读