[英]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 构建时,我看到以下内容
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
隐藏文件夹, bin
和obj
文件夹,然后重新启动项目以再次测试。
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.