Compatibility between R#-Version and R#-SDK-Version

Hi everybody,

can somebody tell me how compatibility between R#-Version and R#-SDK-Version works?
It seems to me that versions have to be an exact match. If either the SDK or the R#-Version is older, tests still work, but my plugin just doesn't load when I start the experimental instance. Is this caused by version incompatibility or is there something I can do about it? If not, (how) is it possible to develop plugins for multiple versions of R#? Neither Google nor this forum seem to give me an answer to that... at least I'm lacking the right keywords. Any help appreciated!!!

Best,
Sven

3 comments
Comment actions Permalink

The major and minor versions of the nuget packages match the version of ReSharper you're targetting. So, SDK 8.2.1158 is the SDK for ReSharper 8.2, 8.1.555 is the SDK for ReSharper 8.1 and 8.0.1243 is the SDK for 8.0.

The tests will run because the tests are run against the binaries in the package, so should always work. ReSharper will only run a plugin that references the same major/minor version as the currently running instance - 8.1 will only load plugins referencing 8.1 assemblies.

You can target multiple versions of ReShaprer by pinning your project to a particular version of the SDK. Your packages.config file will contain:

<package id="JetBrains.ReSharper.SDK" version="8.2.1158" />



you can pin it to a particular version by adding the "allowedVersions" attribute:

<package id="JetBrains.ReSharper.SDK" version="8.2.1158" allowedVersions="[8.2.1158]" />



You'll obviously need multiple projects to target multiple versions. If you use nuget 2.8 and later, you can include multiple packages.config in one folder, too, so the projects can share folders. You name the packages.config file like this: packages.{project}.config, where {project} is the name of your .csproj file e.g. packages.plugin81.config and packages.plugin82.config.
0
Comment actions Permalink

This approach sounds strange to me, but ok. I tried it. Unfortunately, we have Microsoft.Bcl.Build on our dependencies and this one seems to have a problem with the renamed packages.config (it issues an error that it doesn't find said file). Since the Multi-Project-in-one-Folder thing is relatively new, I fear that it is just not yet supported by Bcl. Any experience in that reagard?

EDIT: I just created a small sample with the theoretic setup and it works. What I experience above seems to be a problem specific to our configuration. I'll digg into it tomorrow...

Thank,
Sven

0
Comment actions Permalink

Hmm. I haven't seen this, or encountered it, I'm afraid. It does look like Microsoft.Bcl.Build hardcodes packages.config, so it doesn't support this new nuget 2.8 feature. As far as I can tell, the only workaround for this would be to put your .csproj and packages.config files in separate folders. It might be worth using nuget.org's "Contact owners" feature to ask Microsoft about a new version with support for this feature.

0

Please sign in to leave a comment.