Can not install plugin

I'm using VS 2017 community editor and trying to create a simple plugin. Here is what I did:

1. Created C# .net framework 4.5.2 class library
2. Installed sdk Install-Package JetBrains.ReSharper.SDK -Version 2017.3.5 (I'm using ReSharper 2017.3.5)
3. Created nuget spec 

```

<?xml version="1.0" encoding="utf-8"?>
<package>

<metadata>
<id>ReSharper.Plugin.Demo</id>
<version>0.0.1</version>
<authors>Me</authors>
<owners>Me</owners>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>My first ReSharper plugin</description>

<dependencies>
<dependency id="Wave" version="[11.0]" />
</dependencies>

</metadata>

<files>
<file src="bin\Debug\ReSharper.Plugin.Demo.dll" target="dotFiles\" />
</files>

</package>
```

4. Built nuget package 

5. Tried to install it from custom source and got "Unable to resolve dependency 'JetBrains.ReSharper.SDK.Internal (≥ 111.0.20180323.170625)'.”" error

Here is full installer log:

10:53:37.348 |I| AddProductIdentityToLogs | ReSharperPlatformVs15 Wave 11 Hive _84cc7603
10:53:37.348 |I| AddProductIdentityToLogs | JetBrains ReSharper Ultimate 2017.3.5 Build 111.0.20180323.160610
10:53:37.348 |I| AddProductIdentityToLogs | Subproducts: (1pc)[“JetBrains ReSharper 2017.3.5 Build 2017.3.20180323.162219”]
10:53:37.348 |I| AddProductIdentityToLogs | Zones: (66pcs)[CodeInspectionPageImplZone, DaemonEngineZone, DaemonZone, DiagrammingZone, DiagramsFeatureZone, ExternalSourcesZone, IAspMvcZone, IClrPsiLanguageZone, ICodeEditingOptionsPageImplZone, ICodeEditingZone, ICpuArchitectureZone, IDebuggerZone, IDocumentModelZone, IEnvironmentZone, IIntelCpuArchitectureZone, IJustVs15Zone, ILanguageAspZone, ILanguageBuildScriptsZone, ILanguageCSharpZone, ILanguageCssZone, ILanguageHtmlZone, ILanguageIlZone, ILanguageJavaScriptZone, ILanguageMsBuild, ILanguageNAntZone, ILanguageProtobufZone, ILanguageRazorZone, ILanguageRegExpZone, ILanguageResxZone, ILanguageVBZone, ILanguageXamlZone, INuGetZone, IOuterWorldConnectZone, IParameterInfoZone, IProjectModelZone, IPsiAssemblyFileLoaderImplZone, IPsiLanguageZone, IPublicVisibilityZone, IRdFrameworkZone, IReSharperProductZone, IRiderModelZone, IRoslynAwareZone, ISinceClr2Zone, ISinceClr4Zone, ISinceVs08Zone, ISinceVs09Zone, ISinceVs10Zone, ISinceVs11Zone, ISinceVs12Zone, ISinceVs14Zone, ISinceVs15Zone, ISolutionBuilderFeatureZone, ITextControlsZone, IToolsOptionsPageImplZone, IUIInteractiveZone, IUnitTestingZone, IVisualStudioZone, IVsDebuggerZone, IWebPsiLanguageZone, NamingImplZone, NavigationZone, PsiFeaturesImplZone, ResultListImplZone, SolutionBuilderDuoZone, SweaZone, SymbolsImplZone]
10:53:37.348 |I| AddProductIdentityToLogs | Packages: (29pcs)[JetBrains.Platform.Core.Ide, JetBrains.Platform.Core.MsBuild, JetBrains.Platform.Core.Shell, JetBrains.Platform.Core.Text, JetBrains.Platform.Installer, JetBrains.Platform.Interop.CommandLine, JetBrains.Platform.Interop.dotMemoryUnit.Framework, JetBrains.Platform.Interop.dotMemoryUnit.Interop.Console, JetBrains.Platform.Interop.dotMemoryUnit.Interop.Ide, JetBrains.Platform.RdProtocol, JetBrains.Platform.UIInteractive.Ide, JetBrains.Platform.UIInteractive.Shell, JetBrains.Platform.UIInteractive.Text, JetBrains.Platform.VisualStudio, JetBrains.Psi.Features.Core, JetBrains.Psi.Features.Diagramming, JetBrains.Psi.Features.SolutionBuilder, JetBrains.Psi.Features.src, JetBrains.Psi.Features.Tasks, JetBrains.Psi.Features.UIInteractive.Core, JetBrains.Psi.Features.UIInteractive.Features, JetBrains.Psi.Features.UIInteractive.LiveTemplates, JetBrains.Psi.Features.UIInteractive.Refactorings, JetBrains.Psi.Features.UIInteractive.SolutionAnalysis, JetBrains.Psi.Features.UIInteractive.SolutionBuilder, JetBrains.Psi.Features.UnitTesting, JetBrains.Psi.Features.VisualStudio, JetBrains.ReSharper.Plugins.ReSharperTutorials, JetBrains.ReSharper.src]
10:53:42.710 |I| ExtensionManagerViewModelProvider | [NuGet::PluginsRepository] Attempting to resolve dependency 'Wave (= 11.0.0)'.
10:53:42.710 |W| ItemsSource | ChildrenProvider change is not fully supported
10:53:42.710 |I| ExtensionManagerViewModelProvider | [NuGet::PluginsRepository] Attempting to resolve dependency 'JetBrains.ReSharper.SDK.Internal (≥ 111.0.20180323.170625)'.
10:53:42.726 |E| ExtensionManagerViewModelProvider | Unable to resolve dependency 'JetBrains.ReSharper.SDK.Internal (≥ 111.0.20180323.170625)'.

--- EXCEPTION #1/2 [InvalidOperationException]
Message = “Unable to resolve dependency 'JetBrains.ReSharper.SDK.Internal (≥ 111.0.20180323.170625)'.”
ExceptionPath = Root.InnerException
ClassName = System.InvalidOperationException
HResult = COR_E_INVALIDOPERATION=80131509
Source = NuGet.Core
StackTraceString = “
at NuGet.InstallWalker.OnDependencyResolveError(PackageDependency dependency)
at NuGet.PackageWalker.Walk(IPackage package)
at NuGet.InstallWalker.ResolveOperations(IPackage package)
at NuGet.PackageManager.Execute(IPackage package, IPackageOperationResolver resolver)
at NuGet.PackageManager.InstallPackage(IPackage package, FrameworkName targetFramework, Boolean ignoreDependencies, Boolean allowPrereleaseVersions, Boolean ignoreWalkInfo)
at NuGet.PackageManager.InstallPackage(IPackage package, Boolean ignoreDependencies, Boolean allowPrereleaseVersions)
at JetBrains.UI.SrcView.Extensions.View.ExtensionManagerViewModelProvider.<>c__DisplayClass33.<>c__DisplayClass3f.<get_Model2>b__29()
at JetBrains.Util.ILoggerEx.Catch(ILogger thіs, Action F, ExceptionOrigin origin, LoggingLevel loggingLevel)

--- Outer ---

--- EXCEPTION #2/2 [LoggerException]
Message = “Unable to resolve dependency 'JetBrains.ReSharper.SDK.Internal (≥ 111.0.20180323.170625)'.”
ExceptionPath = Root
ClassName = JetBrains.Util.LoggerException
Data.ManagedThreadName = <NULL>
InnerException = “Exception #1 at Root.InnerException”
HResult = COR_E_APPLICATION=80131600
StackTraceString = “
at JetBrains.Util.ILoggerEx.Catch(ILogger thіs, Action F, ExceptionOrigin origin, LoggingLevel loggingLevel)
at JetBrains.UI.SrcView.Extensions.View.ExtensionManagerViewModelProvider.<>c__DisplayClass33.<>c__DisplayClass3f.<get_Model2>b__28()
at JetBrains.UI.SrcView.ExtensionManager.ViewModels.ExtensionActionViewModel.Do()
at JetBrains.UI.SrcView.ExtensionManager.ViewModels.ExtensionManagerViewModel.<BeginInstallation>b__16(ProgressIndicator indicator, Property`1 description)
at JetBrains.UI.SrcView.ExtensionManager.ViewModels.ProgressPage.<>c__DisplayClass6.<Run>b__3()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()

 

2 comments
Official comment

Ydrugalya, seems you build package from project's .csproj and all project's SDK dependencies get in plugin's dependencies.
That should not be happened.
Build it directly from .nuspec - nuget pack plugin.nuspec

Thank you very much Slava. It helped! I was using `nuget pack` assuming that it'll use nuspec file by default. Turns out it was using csproj.

Thanks for the help!

0

Please sign in to leave a comment.