SQL-Server Version problem with Microsoft.SqlServer.Types

291 views
Skip to first unread message

devfr...@gmail.com

unread,
Oct 2, 2017, 6:49:49 AM10/2/17
to MapSurfer.NET
Hi,

i am trying to use MapSurfer.Net Studio (Version 2.60.6290.39371) with SQL-Server as data provider.

I can make a connection to my server and see the the tables in dropdown "Geometry Columns". After inserting a query and click calculate i get the following error:

************************************** Messages **************************************
[A]Microsoft.SqlServer.Types.SqlGeometry kann nicht in [B]Microsoft.SqlServer.Types.SqlGeometry umgewandelt werden. Der Typ "A" stammt von der "Microsoft.SqlServer.Types, Version=10.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" im Kontext "Default" am Speicherort "C:\WINDOWS\assembly\GAC_MSIL\Microsoft.SqlServer.Types\10.0.0.0__89845dcd8080cc91\Microsoft.SqlServer.Types.dll".. Der Typ "B" stammt von der "Microsoft.SqlServer.Types, Version=12.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" im Kontext "Default" am Speicherort "C:\WINDOWS\assembly\GAC_MSIL\Microsoft.SqlServer.Types\12.0.0.0__89845dcd8080cc91\Microsoft.SqlServer.Types.dll"..
************************************** Stack Trace **************************************
   bei MapSurfer.Data.Utilities.DBUtility.ExecuteScalar[T](IDbConnection conn, String sql)
   bei MapSurfer.Data.Providers.MsSQLSpatial.MsSQLSpatialUtility.GetExtent(SqlConnection conn, String geomColumn, String query)
   bei MapSurfer.Data.Providers.MsSQLSpatial.MsSQLSpatialProvider.GetExtent()
   bei MapSurfer.Layers.StyledLayer.Render(IRenderer renderer, RenderContext context


Anyone an idea about the problem?

THX

Marc

Runge

unread,
Oct 2, 2017, 8:46:15 AM10/2/17
to MapSurfer.NET
Hi Marc,

It seems that MapSurfer.NET is not able to detect the correct version of Microsoft.SqlServer.Types (12.0), as several versions of Microsoft.SqlServer.Types are installed on your machine (see C:\WINDOWS\assembly\GAC_MSIL\Microsoft.SqlServer.Types directory).
You can try the following trick:

1. Copy Microsoft.SqlServer.Types.dll from C:\WINDOWS\assembly\GAC_MSIL\
Microsoft.SqlServer.Types\12.0.0.0__89845dcd8080cc91\ to C:\Program Files\MapSurfer.NET\2.6\Core\Plugins\Providers\MsSQLSpatial.
2. Furthermore, you might also need to copy "msvcr100.dll" and "SqlServerSpatial120.dll" into the same folder. For more details, see https://github.com/MapSurferNET/MapSurfer.NET-Docs/blob/master/usermanual/data_sources/vector/mssqlspatial.md.

Best regards,
Max
Reply all
Reply to author
Forward
0 new messages