0

I have an exsting which is deployed on Windows Azure. But the deployment has been failed with following error. How to fix his

Copying file SqlServerTypes\x64\SqlServerSpatial110.dll to C:\DWASFiles\Sites\<project>\Temp\b3d105f6-8fd0-4093-9957-8174422abded\SqlServerTypes\x64\SqlServerSpatial110.dll failed. Could not find file 'SqlServerTypes\x64\SqlServerSpatial110.dll'. 

How do I fix this issue?

sarat
  • 10,512
  • 7
  • 43
  • 74
  • possible duplicate of [Unable to load DLL 'SqlServerSpatial.dll'](http://stackoverflow.com/questions/16868326/unable-to-load-dll-sqlserverspatial-dll) – jgauffin Mar 03 '14 at 18:20

2 Answers2

2

I had this problem recently and found this blog post that solved it for me: http://blogs.msdn.com/b/adonet/archive/2013/12/09/microsoft-sqlserver-types-nuget-package-spatial-on-azure.aspx

Effectively the solution is to add a NuGet package called Microsoft.SqlServer.Types to your project. This package comes with a readme that explains what you need to do and it's very straightforward.

RobH
  • 3,604
  • 1
  • 23
  • 46
1

Installing NuGet package Microsoft.SqlServer.Types solved the problem. But remember also to add this line before calling any spatial operation:

SqlServerTypes.Utilities.LoadNativeAssemblies(AppDomain.CurrentDomain.BaseDirectory);

This is explained inside readme.htm after installing NuGet package.

Alt-WN
  • 81
  • 6