Vishful thinking…

Using the SqlGeography type when working with SQL Server 2008 spatial features

Posted in Uncategorized by viswaug on May 23, 2008

SQL Server 2008 comes packaged with some .NET types like SqlGeography to help development for the new built-in spatial features. It contains real useful functions to convert the geography to GML or WKT and back. This type can be found in the “Microsoft.SqlServer.Types.dll” assembly that will be installed only with SQL Server 2008 and not with the .NET 3.5 framework itself. So, if you are writing a client application that will run on machines that do not have SQL Server 2008 installed, this DLL needs to be copied to client machine manually. On the server machine, the assembly is installed into the GAC but the “Add reference” dialog in Visual Studio 2008 does not pick it up.

So, right now, references should be added to the assembly manually. This assembly can be found in the Binn directory (on CTP6) or 100\SDK\Assemblies (in RTM).

There is a new MSI coming that will install these new system CLR types. This will be part of a “Feature Pack” and will be redistributable outside the server.