My application crashes with the following error whenever I save to the DB.
Unable to find an entry point named 'SetClrFeatureSwitchMap' in DLL 'SqlServerSpatial110.dll'.
This error started yesterday afternoon after a Windows Update and PC Reboot. The dll is not referenced in the project and is not in the bin folder.
I use EF5 and I can connect to the DB and pull data but when I call ObjectContext.SaveChanges() the error occurs.
The application does not use geometry, so I have no idea where this is coming from.
I had the same issue, and fixed it by adding the following lines to the web.config of my application:
<runtime> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> <dependentAssembly> <assemblyIdentity name="Microsoft.SqlServer.Types" publicKeyToken="89845dcd8080cc91" /> <bindingRedirect oldVersion="18.104.22.168-22.214.171.124" newVersion="10.0.0.0" /> </dependentAssembly> </assemblyBinding> </runtime>
This forces the EntityFramework to use the version 10 of the SqlServer.Types.dll, which doesn't have the Geometry type apparently.
So, If I add the following line of code to the start-up of the application it will use the SQL 2014 version of the Microsoft.SqlServer.Types assembly which doesn't seem to have the problem stated above.
System.Data.Entity.SqlServer.SqlProviderServices.SqlServerTypesAssemblyName = "Microsoft.SqlServer.Types, Version=126.96.36.199, Culture=neutral, PublicKeyToken=89845dcd8080cc91";
This is fine for machines that have SQL Server 2014 SDK installed.
I have also submitted a bug with Microsoft here: