无法加载 DLL 'SqlServerSpatial.dll' [英] Unable to load DLL 'SqlServerSpatial.dll'
问题描述
我有一个引用 System.Data.Spatial
的 .NET MVC Web 应用程序,因此我可以在属性上使用 DbGeography
数据类型来进行某些地理定位.我使用的是带有 .NET 4.5 的 Visual Studio 2012,并且在我的开发机器上没有完整安装 SQL Server(只有 localdb).
I have a .NET MVC web application referencing System.Data.Spatial
so I can use the DbGeography
datatype on a property for some geolocation stuff. I'm using Visual Studio 2012 with .NET 4.5 and do not have a full installation of SQL Server on my development machine (only localdb).
该应用程序运行良好,直到我将其推送到 Azure.一旦我的应用点击了我的 DbGeography
属性,它就会抛出这个错误:
The app works great until I push it to Azure. As soon as my app hits my DbGeography
property, it throws this error:
无法加载 DLL 'SqlServerSpatial.dll':指定的模块可以找不到.
Unable to load DLL 'SqlServerSpatial.dll': The specified module could not be found.
有没有其他人遇到过这个问题?
Has anyone else encountered this issue?
推荐答案
SqlServerSpatial.dll 是非托管代码.您必须在服务器上安装正确的版本(64 位).将 DLL 添加到您的项目中.将SqlServerSpatial110.dll的属性设置为复制到输出目录=始终复制"
SqlServerSpatial.dll is unmanaged code. You have to install the correct version (64bit) on the server. Add the DLL to your project. Set the properties of SqlServerSpatial110.dll to "Copy to Output directory = Copy always"
您可以找到详细信息 这里
这篇关于无法加载 DLL 'SqlServerSpatial.dll'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!