简体   繁体   English

Nuget package 更新 - Microsoft.Data.SqlClient.SNI.x64

[英]Nuget package update - Microsoft.Data.SqlClient.SNI.x64

when restoring a locally created nuget package I receive the following error:恢复本地创建的 nuget package 时,我收到以下错误:

Failed to add reference to 'Microsoft.Data.SqlClient.SNI.x64'.
Please make sure that the file is accessible, and that it is a valid assembly or COM component

错误截图

When I look at the nuget build I see the following当我查看 nuget 构建时,我看到以下内容

Nuget 输出截图

click to enlarge点击放大

The highlighted yellow "missing" dlls in the screenshot above do actually exist in the project.上面屏幕截图中突出显示的黄色“缺失”dll 确实存在于项目中。

I am using Visual Studio 2017 professional我正在使用 Visual Studio 2017 专业版

Thanks for any help Mark感谢您的帮助马克

Nuget package update - Microsoft.Data.SqlClient.SNI.x64 Nuget package 更新 - Microsoft.Data.SqlClient.SNI.x64

Please try the following steps:请尝试以下步骤:

1) close VS Instance, delete nuget.config file under C:\Users\xxx(current use account)\AppData\Roaming\NuGet . 1)关闭VS Instance,删除nuget.config C:\Users\xxx(current use account)\AppData\Roaming\NuGet下的nuget.config文件。

2) delete .vs hidden folder under your solution folder, bin and obj folder then restart your project to test again. 2)删除解决方案文件夹下的.vs隐藏文件夹, binobj文件夹,然后重新启动项目以再次测试。

3) Please try to create a new empty project in VS2019 and test whether you can install the package Microsoft.Data.SqlClient . 3)请尝试在VS2019中新建一个空项目,测试是否可以安装package Microsoft.Data.SqlClient

If you cannot install it, you should note that whether your VS or OS has broken.如果您无法安装它,您应该注意您的 VS 或操作系统是否已损坏。 If the new project has no error, the issue is your project itself.如果新项目没有错误,则问题出在您的项目本身。 You can try the above steps to troubleshoot the issue.您可以尝试上述步骤来解决问题。

If the issue still persists in the new project,如果问题在新项目中仍然存在,

You can try to repair VS or update VS to the latest version.您可以尝试修复 VS或将 VS 更新到最新版本。

Also , try to update OS or use the System File Checker tool to repair missing or corrupted system files .此外,尝试更新操作系统或使用系统文件检查器工具来修复丢失或损坏的系统文件

Besides , try another PC to test whether the issue persists.此外,尝试另一台 PC 测试问题是否仍然存在。

Microsoft.Data.SqlClient.SNI.X64 or X32 files need to be removed from release folder before creating package.在创建 package 之前,需要从发布文件夹中删除 Microsoft.Data.SqlClient.SNI.X64 或 X32 文件。

Microsoft.Data.SqlClient.SNI.X64 will be added automatically while adding Microsoft.Data.SqlClient. Microsoft.Data.SqlClient.SNI.X64 将在添加 Microsoft.Data.SqlClient 时自动添加。

So, remove the dll before creating the package and then try installing it.因此,在创建 package 之前删除 dll,然后尝试安装它。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 为什么 ClickOnce 不将 Microsoft.Data.SqlClient.SNI.x86 和 x64 dll 添加到发布文件夹中 - Why ClickOnce does not add Microsoft.Data.SqlClient.SNI.x86 and x64 dlls into publish folder nuget 包 Microsoft.Data.SqlClient 是否适用于实体框架? - Does the nuget package Microsoft.Data.SqlClient work with Entity Framework? 使用 Microsoft.Data.SqlClient 2.0 时无法从单元测试加载 DLL 'Microsoft.Data.SqlClient.SNI.x86.dll' - Unable to load DLL 'Microsoft.Data.SqlClient.SNI.x86.dll' from Unit Tests when using Microsoft.Data.SqlClient 2.0 在某些项目中需要 Microsoft.Data.SqlClient NuGet,但在其他项目中,您可以使用 Microsoft.Data.SqlClient 而不使用 NuGet - Microsoft.Data.SqlClient NuGet is needed in some projects but others you can do using Microsoft.Data.SqlClient without the NuGet System.Data.SqlClient 将 nuget package 导入库 - System.Data.SqlClient imported nuget package into library Microsoft.Data.SqlClient.SqlException (0x80131904) - Microsoft.Data.SqlClient.SqlException (0x80131904) 使用 nuget package 会产生 Core SqlClient Data Provider invalid column 错误,但 package 中的测试很好 - Using a nuget package produces Core SqlClient Data Provider invalid column error but tests within package are fine 什么是Microsoft ASP.NET网页2数据Nuget包? - What is the Microsoft ASP.NET Web Pages 2 Data Nuget Package for? Microsoft.Data.SqlClient.SqlException (0x80131904): ',' 附近的语法不正确 - Microsoft.Data.SqlClient.SqlException (0x80131904): Incorrect syntax near ',' SQL 服务器 Microsoft.Data.SqlClient.SqlException (0x80131904):执行超时在 azure 上过期 - SQL server Microsoft.Data.SqlClient.SqlException (0x80131904): Execution Timeout Expired on azure
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM