After installing VS 2015 CTP 4, HierarchyID stopped working in SQL Server 2014. This is the bug listed here.
I am looking for a workaround.
To that end, I have tried reinstalling everything associated with SQL Server 2014 and Visual Studio 2015 CTP.
Additionally, I noticed the following (before the reinstall):
Image may be NSFW.
Clik here to view.
After re-installing, I now have version 12.0.2000.8 installed, and its 6.80 MB.
Additionally, I know that I have a working version of the SQL Server type assembly as I can run the following C# code without error:
var root = SqlHierarchyId.Parse("/"); var parent = SqlHierarchyId.Parse("/1/"); var child = SqlHierarchyId.Parse("/1/1/"); Console.WriteLine(child.ToString());
While in SQL, the following errors:
declare @Root hierarchyid = '/', @Parent hierarchyid = '/1/', @Child hierarchyid = '/1/1/'; print @Root.ToString(); print @Parent.ToString(); print @Child.ToString(); -- Throws exception
Is there a way to force SQL Server 2014 to use a particular assembly for this type? Additionally, if I could track down the actual source of the file that is the source of the error I would have a chance at restoring that file/set of files. Is there a way to get the error message to show the file that it originated from?