Visual Studio 2015 preview breaks SQL Server hierarchy

After installing VS2015, SQL Server can no longer call the ToString () method for the CLR type of the CLID hierarchy - for some values, it works, and for others it raises the following exception:

.NET Framework error while executing custom routine or cumulative "hierarchy": Microsoft.SqlServer.Types.HierarchyIdException: 24000: SqlHierarchyId failed because the HierarchyId object was created from an invalid binary string.

This is easy to reproduce by running the following simple query:

select OrganizationNode.ToString () from HumanResources.Employee

I tried to remove .NET 4.5.3, but that did not help. Any known workarounds? Trying to execute the CAST hierarchyid value for VARCHAR led to the same error, so I assume it calls ToString () under the hood.

+3
source share
1 answer

Visual Studio 2015 CTP6 fixes this.

Edit: Changed CTP5 (which fixed it for a short time) to CTP6, which fixes it for me constantly.

-1
source

Source: https://habr.com/ru/post/1209335/


All Articles