Updated on Kisan Patel
Problem:
Unable to load DLL ‘SqlServerSpatial110.dll’: The specified module could not be found.
Unable to load SqlServerSpatial.dll
Solution:
Solution 1
Add the reference of Microsoft.SqlServer.Types in Web.config of application resolved the issue.
<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>
Solution 2
added the reference to the missing package in my project:
PM> Install-Package Microsoft.SqlServer.Types
Then forced the “Copy to output directory” option to “Copy always” for the SqlServerSpatial110.dll
(probably this step is not strictly required…)
For ASP.NET projects, you need to add the following line of code to the Application_Start method in Global.asax.cs
:
SqlServerTypes.Utilities.LoadNativeAssemblies(Server.MapPath("~/bin"));