Fixed issue #3 runtime dll is now installed in user myassemblies during initiali…
…ze. Tested and working in Exp
Showing
1 changed file
with
10 additions
and
4 deletions
... | @@ -137,16 +137,22 @@ namespace WebTest.WebServive.Plugin | ... | @@ -137,16 +137,22 @@ namespace WebTest.WebServive.Plugin |
137 | // Copy message editor plugins and recorder plugin to users webtest dir | 137 | // Copy message editor plugins and recorder plugin to users webtest dir |
138 | ShellSettingsManager sm = new ShellSettingsManager(this); | 138 | ShellSettingsManager sm = new ShellSettingsManager(this); |
139 | string pluginPath = sm.GetApplicationDataFolder(ApplicationDataFolder.Documents) + @"\WebTestPlugins\"; | 139 | string pluginPath = sm.GetApplicationDataFolder(ApplicationDataFolder.Documents) + @"\WebTestPlugins\"; |
140 | string assPath = sm.GetApplicationDataFolder(ApplicationDataFolder.Documents) + @"\MyAssemblies\"; | ||
140 | Directory.CreateDirectory(pluginPath); | 141 | Directory.CreateDirectory(pluginPath); |
141 | pluginPath += Path.GetFileName(messageLoc); | 142 | Directory.CreateDirectory(assPath); |
142 | File.Copy(messageLoc, pluginPath, true); | 143 | string messageLocNew = pluginPath + Path.GetFileName(messageLoc); |
144 | File.Copy(messageLoc, messageLocNew, true); | ||
145 | string runtimeLocNew = assPath + Path.GetFileName(runtimeLoc); | ||
146 | File.Copy(runtimeLoc, runtimeLocNew, true); | ||
143 | 147 | ||
144 | //Update the registry | 148 | //Update the registry |
145 | RegistryKey wrk = Registry.CurrentUser.CreateSubKey("SOFTWARE\\WebServicePlugin"); | 149 | RegistryKey wrk = Registry.CurrentUser.CreateSubKey(@"SOFTWARE\WebServicePlugin"); |
146 | wrk.SetValue("INSTALLED", 1, RegistryValueKind.DWord); | 150 | wrk.SetValue("INSTALLED", 1, RegistryValueKind.DWord); |
151 | RegistryKey wark = Registry.CurrentUser.CreateSubKey(@"SOFTWARE\Microsoft\.NETFramework\AssemblyFolders\MyAssemblies"); | ||
152 | wark.SetValue(null, assPath); | ||
147 | 153 | ||
148 | //Tell the user | 154 | //Tell the user |
149 | VsShellUtilities.ShowMessageBox(this, "Recorder plugin copied to: " + pluginPath, "Plugin files installed", OLEMSGICON.OLEMSGICON_INFO, OLEMSGBUTTON.OLEMSGBUTTON_OK, OLEMSGDEFBUTTON.OLEMSGDEFBUTTON_FIRST); | 155 | VsShellUtilities.ShowMessageBox(this, "Recorder plugin copied to: " + pluginPath + "\n\nUser assemblies copied to: " + assPath, "Plugin files installed", OLEMSGICON.OLEMSGICON_INFO, OLEMSGBUTTON.OLEMSGBUTTON_OK, OLEMSGDEFBUTTON.OLEMSGDEFBUTTON_FIRST); |
150 | } | 156 | } |
151 | } | 157 | } |
152 | 158 | ... | ... |
-
Please register or sign in to post a comment