[英]DbGeography.FromText - Unable to load DLL 'SqlServerSpatial140.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
I have tried to copy spatial140 from packages folder "\packages\Microsoft.SqlServer.Types...\nativeBinaries", in Visual Studio build is a success, not found some error.我试图从包文件夹“\packages\Microsoft.SqlServer.Types...\nativeBinaries”中复制 spatial140,在 Visual Studio 中构建成功,没有发现一些错误。
But when run the project, I got that error.但是在运行项目时,我得到了那个错误。
web.config
.web.config
中添加绑定重定向。<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Microsoft.SqlServer.Types" publicKeyToken="89845dcd8080cc91" />
<bindingRedirect oldVersion="1.0.0.0-11.0.0.0" newVersion="10.0.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
I know this is bad, but I have solved the issues, must copy spatial140.dll to bin folder.我知道这很糟糕,但我已经解决了问题,必须将 spatial140.dll 复制到 bin 文件夹。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.