While trying debug my real problem, I'm trying to repair the .NET framework, because it looks like something in System.Data.SqlClient is hosed. But you can't uninstall this because it's part of the OS in Windows8, and you can't install it because it's already installed, and so I can't find any way to fix my problem. I suppose I could reinstall the whole OS, but that's way too painful.
To Repair corrupted Windows files in Windows 8, open a command prompt with admin rights and run this DISM command:
DISM /Online /Cleanup-Image /RestoreHealth
This downloads the clean files and installs them correctly.