[英]Failed to load ...\x86\SNI.dll
I am trying out Entity Framework (Core).我正在尝试实体框架(核心)。 I installed the packages from NuGet and wrote a very basic program to test things out.
我从 NuGet 安装了软件包,并编写了一个非常基本的程序来测试。 However, when I run it, I get
System.TypeInitializationException
and inside that, there is a Win32Exception - Failed to load C:\\...Documents\\x86\\SNI.dll
.但是,当我运行它时,我得到
System.TypeInitializationException
并且在其中,有一个Win32Exception - Failed to load C:\\...Documents\\x86\\SNI.dll
。
The path where it's looking is wrong.它正在寻找的路径是错误的。 The Dll is inside the project folder, but for some reason it is trying to load it from my documents folder.
Dll 位于项目文件夹内,但由于某种原因,它试图从我的文档文件夹中加载它。 When I copy and paste the x86 folder from where it was installed to documents, the program works.
当我将 x86 文件夹从安装位置复制并粘贴到文档中时,该程序可以正常工作。 However, I would be happier if it just worked the way it should, and loaded the Dll from where it is installed.
但是,如果它按应有的方式工作,并从安装位置加载 Dll,我会更高兴。
Is there any way to achieve this?有什么办法可以做到这一点?
For me it seems to be an issue with the string "C#" in the path, especially the "#" character.对我来说,路径中的字符串“C#”似乎是一个问题,尤其是“#”字符。 I was facing the same issue.
我面临着同样的问题。 My path of the project was
我的项目路径是
D:\Company\Projects\C#\Live\pg_change_tool_new\
D:\Company\Projects\C#\Live\pg_change_tool_new\
...and it was trying to load the DLL from this path: ...并且它试图从该路径加载 DLL:
D:\Company\Projects\x86\SNI.dll
D:\公司\项目\x86\SNI.dll
After I cloned the project to a location without the string "C#" in the path name, it tried to load the DLL from the right location:在我将项目克隆到路径名中没有字符串“C#”的位置后,它尝试从正确的位置加载 DLL:
D:\Company\Projects\pg_change_tool_new\PG_Change_Tool_UI\bin\Debug\x86\SNI.dll
D:\Company\Projects\pg_change_tool_new\PG_Change_Tool_UI\bin\Debug\x86\SNI.dll
...and it worked fine. ...而且效果很好。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.