Deploying plugin

R# Version 3.0 and Above

There are two tasks in the plugin installation. The plugin files should be placed into a folder where R# picks them up, and R# should be instructed to re-initialize its UI to include the new items in it.

Placing the Plugin Files

You should create a folder for your plugin in a location that is monitored by R#, and copy the plugin files into that folder. The location should be chosen based on the "all users" scenario:

  • "All Users" — use the Plugins folder under the R# assemblies location, "<R#InstallDir>/Bin/Plugins".
  • "Current User Only" — use the Plugins folder under the R# Roaming Application Data folder, "<RoamingAppData>/ReSharper/v<ReSharperVersion>/vs<VsVersion><VsRootSuffix>/Plugins".

The R# assemblies location ("R#InstallDir" in the above example) can be obtained from the "InstallDir" string value under the R# application Registry key, see below for details.

Examples: for R# version 3.0 under Visual Studio 2005, the "All Users" installation of an "Acme" plugin should write its binaries into the "C:\Program Files\ReSharper\v3.0\vs8.0\bin\Plugins\Acme" folder. The "Current User Only" installation for a "MyName" user should write to the "C:\Users\MyName\AppData\Roaming\ReSharper\v3.0\vs8.0\Plugins\Acme" folder.

Re-initializing the UI

You should write the current date and time in any format into the "One-Time Initialization Generation" string value under the R# application Registry key.

Please note that you should pick the Registry Hive based on the "all users" scenario:

  • "All Users" — use the Local Machine registry hive (HKLM, HKEY_LOCAL_MACHINE).
  • "Current User Only" — use the Current User registry hive (HKCU, HKEY_CURRENT_USER).

The R# Registry key is located at "SOFTWARE\JetBrains\ReSharper\v<ReSharperVersion>\vs<VsVersion><VsRootSuffix>".

Example: for R# version 3.0 under Visual Studio 2005, an "All Users" plugin installation would write to the "HKEY_LOCAL_MACHINE\SOFTWARE\JetBrains\ReSharper\v3.0\vs8.0\One-Time Initialization Generation" string value.

Note: When authoring an installation targeting the Windows Installer technology, you should use the "[Date]T[Time]" string as a value for writing into the specified Registry location.

R# Version 2.5 and Below

Installing Plugin for All Users

To install the plugin for all users that use the given copy of ReSharper, go to the ReSharper installation folder (usually "c:\Program Files\JetBrains\ReSharper\VS2003" or "c:\Program Files\JetBrains\ReSharper\VS2005"), find "Plugins" folder and create a new subfolder (name it after your plugin). Copy all dll's of your plugin to the created subfolder.

Installing Plugin for One User

Go to ReSharper settings folder (usually "C:\Documents and Settings\<user name>\Application Data\JetBrains\ReSharper") and create "Plugins" subfolder there. Then create a subfolder for your plugin and copy the dll's as described above.

Instructing ReSharper to rebuild Visual Studio menus

If you create or modify actions in your plugin, you will need to tell ReSharper that current set of commands provided to Visual Studio is invalid. To do so, you need to remove registry value:

Key: HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\8.0
Value: ReSharper_OneTimeInitializationDoneForBuild

You can create batch file to do this automatically:

@reg delete HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\8.0 /f /v ReSharper_OneTimeInitializationDoneForBuild

Note: If you are using experimental Visual Studio configuration, i.e. /RootSuffix is specified, you need to append root suffix value to "8.0" in the key name. For example, if you have "/RootSuffix Exp" key name will be HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\8.0Exp

Labels

 
(None)