A workaround for restoring HierarchyId in SQL server 2014 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):

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(&quot;/&quot;);
        var parent = SqlHierarchyId.Parse(&quot;/1/&quot;);
        var child = SqlHierarchyId.Parse(&quot;/1/1/&quot;);
        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?
I am looking for a workaround.


For me, based on conversations I've seen about this elsewhere, you have four options:


Perform a system restore to a point prior to the Visual Studio CTP installation. 
Wait for Connect item #1063935 to be addressed - it may be in a future Cumulative Update or Service Pack for SQL Server, or it may be in a patch or some kind of update for the Visual Studio preview. It is not addressed explicitly in Cumulative Update #6, but applying that can't hurt to try.
Back up your databases somewhere, and remove everything Visual Studio, .net &amp; SQL Server related (the hard way, not through the Control Panel), and install SQL Server again.
If 3. doesn't work, back up your databases somewhere, and nuke &amp; pave your OS.


If 1. is not possible, then you need to take further action in the future to prevent having to do these other much harder things:


Either don't install Visual Studio, SQL Server etc. CTP or preview versions on your critical / primary workstation (virtual machines are a much better target for this sort of thing); or,
start taking better system backups so that if you do decide to install such things you can recover.


This can be an expensive lesson that, sadly, most people learn the hard way.