Unable to load DLL 'SqlServerSpatial.dll'

前端 未结 7 2116
谎友^
谎友^ 2020-12-01 20:48

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

7条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-01 21:31

    SQL 2012 installs this dll too, SQL 2014 don't! You have to install the Microsoft System CLR Types for SQL Server 2008 R2 on the machine.

    1. http://www.microsoft.com/en-us/download/details.aspx?id=26728
    2. Click Download
    3. Check off one of these depending on your processor architecture:

      • 1033\x64\SQLSysClrTypes.msi
      • 1033\x86\SQLSysClrTypes.msi
      • 1033\IA64\SQLSysClrTypes.msi
    4. Click Next

    Edit

    as Ian Grainger's comment, you have to install the correct version based on your IIS. apparently IIS Express runs in 32bit mode by default.

提交回复
热议问题