Friday, August 14, 2009

unable to load dll 'sqlserverspatial.dll'

I was trying to move my .Net SqlServer 2008 to another dev machine and I kept getting this error, even thought I have the SqlServerSpatial.dll file in my bin. If you are getting the same error, do the following:

1. Make sure the SqlServerSpatial.dll file is in the bin of the application (you can find this dll on the machine that you have SqlServer2008 installed in the C:\Windows\System32 folder)
2. Make sure you have the latest VC++ redistributables installed. Turns out SqlServerSpatial.dll relies on VC++. You can download these redistributables for 32 bit (here) and 64 bit (here).
3. If you are still getting the error even after doing the above two, try running the SqlServer types installer to register the dll's with GAC.

1 comment:

  1. This comment has been removed by the author.

    ReplyDelete