.NET项目中System.Data.SqlClient程序集加载失败问题求助
.NET项目System.Data.SqlClient程序集版本不匹配问题
在Visual Studio的.NET项目中,每次启动程序都会提示找不到指定版本的System.Data.SqlClient程序集。添加请求的版本后,错误会再次出现,但要求的版本又发生变化。具体错误信息如下:
System.IO.FileNotFoundException: 'Could not load file or assembly 'System.Data.SqlClient, Version=4.5.0.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.'
该问题仅在从.NET Standard库调用.NET Framework函数时出现,已尝试以下解决步骤:
- 检查项目依赖项:确认项目引用了正确版本的
System.Data.SqlClient - 更新NuGet包:通过NuGet包管理器将所有包更新至最新版本
- 清理并重建项目:使用Visual Studio中的
Clean Solution和Rebuild Solution选项
内容的提问来源于stack exchange,提问作者Ruben
相关产品推荐
相关产品推荐

