I have an ASP.NET MVC WebApp with an attached remote SQL database where I am getting above error regarding SqlServerSpatial110.dll when the VS solution is started from localhost.
So far I was not even aware that this DLL is used by my app and I have no references in the solution that point to it.
- the solution was running without error so far (locally and remote) - the error first appeared after some HTML changes (no reference changes/additions made). Important: I had 2 different solutions open with VS at that moment. One solution opened as admin and the other as regular user.
- running the solution in debug mode gives no error
- I also restored the PC system to a previous point where the solution previously was running correctly, but that did not remove the error
- I searched for
SqlServerSpatial110.dllon my PC and found it at 2 locations (C:\Windows\System32 and C:\Program Files\Microsoft SQL Server\110\LocalDB\Binn) but not in the solution folders - Windows 10, 64 Bit. Visual Studio 2019
Edit: I added an entry to the Web.config as suggested here
<dependentAssembly>
<assemblyIdentity name="Microsoft.SqlServer.Types" publicKeyToken="89845dcd8080cc91" />
<bindingRedirect oldVersion="1.0.0.0-11.0.0.0" newVersion="10.0.0.0" />
</dependentAssembly>
and the error vanished. However, I don't understand why this is needed all of a sudden, since previously the solution was working without error and no relevant changes were made.
Any help to pin down the problem or how to proceed would be appreciated.