public string Disable() { using (RegistryKey key = OpenMvc3Key()) key.DeleteSubKeyTree("xUnit.net"); UninstallZipFiles(VisualWebDeveloper2010.GetTestProjectTemplatePath("CSharp")); UninstallZipFiles(VisualWebDeveloper2010.GetTestProjectTemplatePath("VisualBasic")); return(null); }
public string Enable() { string CSharpPath = VisualWebDeveloper2010.GetTestProjectTemplatePath("CSharp"); if (!Directory.Exists(CSharpPath)) { Directory.CreateDirectory(CSharpPath); } ResourceHelper.WriteResourceToFile("Xunit.Installer.Templates.MVC3-CS-VS2010.zip", Path.Combine(CSharpPath, TEMPLATE_NAME_CSHARP)); string VBPath = VisualWebDeveloper2010.GetTestProjectTemplatePath("VisualBasic"); if (!Directory.Exists(VBPath)) { Directory.CreateDirectory(VBPath); } ResourceHelper.WriteResourceToFile("Xunit.Installer.Templates.MVC3-VB-VS2010.zip", Path.Combine(VBPath, TEMPLATE_NAME_VB)); using (RegistryKey key = OpenMvc3Key()) using (RegistryKey templateKey = key.CreateSubKey("xUnit.net")) { using (RegistryKey csharpKey = templateKey.CreateSubKey("C#")) { csharpKey.SetValue("AdditionalInfo", "http://xunit.codeplex.com/"); csharpKey.SetValue("Package", ""); csharpKey.SetValue("Path", @"CSharp\Test"); csharpKey.SetValue("Template", TEMPLATE_NAME_CSHARP); csharpKey.SetValue("TestFrameworkName", "xUnit.net build " + Assembly.GetExecutingAssembly().GetName().Version); } using (RegistryKey vbKey = templateKey.CreateSubKey("VB")) { vbKey.SetValue("AdditionalInfo", "http://xunit.codeplex.com/"); vbKey.SetValue("Package", ""); vbKey.SetValue("Path", @"VisualBasic\Test"); vbKey.SetValue("Template", TEMPLATE_NAME_VB); vbKey.SetValue("TestFrameworkName", "xUnit.net build " + Assembly.GetExecutingAssembly().GetName().Version); } } return(null); }