resharperresharper-plugins

Unable to resolve JetBrains.ReSharper.SDK while installing a ReSharper's plugin


I'm trying to install a custom ReSharper's plugin I wrote using the ReSharper Extension Manager but I get the error

Attempting to resolve dependency 'JetBrains.ReSharper.SDK (≥ 8.2.1158)'.
Unable to resolve dependency 'JetBrains.ReSharper.SDK (≥ 8.2.1158)'.

I followed the official documentation and here is my .nuspec.

<?xml version="1.0"?>
<package >
  <metadata>
    <id>CustomMacro</id>
    <version>1.0.0.0</version>
    <title>Custom macro</title>
    <authors>Me</authors>
    <description>do something</description>
    <copyright>Copyright &#x00A9; 2014</copyright>
    <tags>Cool Plugin</tags>
    <dependencies>
      <dependency id="ReSharper" version="[8.2,8.3]" />
    </dependencies>
  </metadata>
  <files>
    <file src="bin\Release\*.dll" target="ReSharper\vAny\vs12.0\plugins" />
  </files>
</package>

Note: The nuget packaged is pushed inside my company's nuget repository and when I search for the package in the Extension Manager I do it from Online -> All tag


Solution

  • That .nuspec file looks fine, but doesn't match the error message. The error message indicates that the .nupkg has a dependency on "JetBrains.ReSharper.SDK". ReSharper uses NuGet packages in a runtime capacity, so development dependencies shouldn't be included. When installing, ReSharper will try to resolve any dependencies and install them (as runtime extensions, not assembly references). The "JetBrains.ReSharper.SDK" package is a nuget assembly reference package, and isn't required, or available on ReSharper's extension package gallery, so it fails to install.

    I'd suggest getting NuGet Package Explorer and double clicking on the .nupkg to see if it's got the same .nuspec as you've shown.

    Also, you should be copying the *.dll files into ReSharper\v8.2\plugins. It can't live in vAny because ReSharper plugins are compiled against specific versions of ReSharper. And it should only go in the vs12.0 folder if it's specific to Visual Studio 2013, i.e. it uses VS2013 assemblies and functionality.