Cannot get minimal R#9.1 code completion example to work

Hey guys,

I'm struggling to get a minimal ReSharper 9.1 example to work in Visual Studio 2013. I'm familiar with R#8.x development, but I have a hard time understanding the new concepts of zones, activation, the revised actions, etc... even though I read all the related parts of the dev guide. To get familiar with these new concepts, I'd like to create a trivial code completion component that adds "hello" to the proposal list. I took this example (with minor modifications) from the plugin dev guide [1] and put it together with the other pieces scattered across the dev guide... unfortunately, it does not work and I'm stuck. You can access my current state at [2].

I added a ZoneDefition, a ZoneMarker, a ZoneActivator, and I added the basic extension of the items provider. The code compiles, I package it with the supplied packaging script to pack the .nupkg, and I deploy it to a local folder. This folder is configured as a local feed in the experimental instance. It seems that I can install the generated packages in the extension manager (it is marked as installed), however, it is not listed in the active modules for this instance if I debug into it.

I have several questions regarding the current state:

  1. I cannot add the "JetBrains.ReSharper.SDK" to my .nuspec file. When I add it, the installation fails in the extension manager, because the ReSharper SDK dependency cannot be resolved. What is the right way do do it?
  2. Is it necessary to call the marker "ZoneMarker" or is it sufficient to add the right attribute and the name is ignore anyways?
  3. What is missing in the extension that prevents it from getting activated/ loaded?

It would be nice to get some feedback on the missing or incorrect parts of the minimal example or pointers to relevant sources of information. Any help is appreciated!

Thanks in advance!



Comment actions Permalink

Some time passed and I learned a lot about R#9.1, unfortunately the hard way...

  1. The dependency is not needed.
  2. The class has to be called ZoneMarker. For now I removed all IRequire<> from the extension list to generate a zone that is always loaded.
  3. Make sure that your extension id in the .nuspec file contains a ".". If it doesn't, you can install your extension in the extension manager without any problems, but it will fail to load.

What helped me a lot was to study source code of existing R#9.1 extensions. They are quite easy to find, just head to the R# Gallery and look out for extensions that target the right version. Most of the extensions link their Github page which contains the necessary sources... monkey see, monkey do. :p

Comment actions Permalink

Glad to see you got it working. I've updated some of the pages on GitHub to clarify some of the points you've raised, and will push a new version of the devguide shortly.


Please sign in to leave a comment.