Reactivated the Visual Studio script

Reactivated the Visual Studio specific script and moved some of the
macros from TextReplacement into it.