mrward / monodevelop-nuget-extensions

Extends the MonoDevelop NuGet addin
MIT License
72 stars 9 forks source link

Method not found: JsonRpc.get_JsonSerializer() #36

Closed mrward closed 4 years ago

mrward commented 4 years ago

VS Mac 8.6 - Method not found error is displayed on opening the NuGet Package Manager Console and when any command is run.

ERROR [2020-04-18 14:24:04Z]: OnPackageSourcesChanged error
System.MissingMethodException: Method not found: Newtonsoft.Json.JsonSerializer StreamJsonRpc.JsonRpc.get_JsonSerializer()
  at MonoDevelop.PackageManagement.Scripting.RemotePowerShellHost.OnPackageSourcesChanged (System.Collections.Generic.IEnumerable`1[T] sources, MonoDevelop.PackageManagement.SourceRepositoryViewModel selectedPackageSource) [0x00002] in <5c9c02dcdac3488390b32149e3f9df62>:0 
ERROR [2020-04-18 14:24:20Z]: GetExpansionsAsync error.
System.NullReferenceException: Object reference not set to an instance of an object
  at MonoDevelop.PackageManagement.Scripting.TabExpansion.GetExpansionsAsync (System.String line, System.String lastWord, System.Threading.CancellationToken token) [0x00034] in <5c9c02dcdac3488390b32149e3f9df62>:0 
  at NuGetConsole.Host.CommandExpansion.GetExpansionsAsync (System.String line, System.Int32 caretIndex, System.Threading.CancellationToken token) [0x00191] in <5c9c02dcdac3488390b32149e3f9df62>:0 
  at MonoDevelop.PackageManagement.PackageConsoleView.TryGetExpansionsAsync (System.String line, System.Int32 caretIndex, System.Threading.CancellationToken token) [0x0008c] in <5c9c02dcdac3488390b32149e3f9df62>:0 
diez-esteban commented 4 years ago

Has anyone managed to resolve this? I'm going thru the same situation on VS Mac 8.6 (build 4520). Thank you.

mrward commented 4 years ago

@diez-esteban The only problem I see with VS Mac 8.6 is a problem due to different NuGet versions being used.

Install-Package : Could not load file or assembly 'NuGet.Resolver, Version=5.5.0.4, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies.
At line:1 char:1

The Method not found error about StreamJsonRpc.JsonRpc.JsonSerializer was fixed in NuGet extensions 0.22. VS Mac updated its version of StreamJsonRpc to v2 which had an API change.

Will look at updating the NuGet extensions addin to work with VS Mac 8.6 shortly.

mrward commented 4 years ago

@diez-esteban Published NuGet extensions 0.23 which fixes the NuGet.Resolver error when using it with Visual Studio for Mac 8.6.0.

diez-esteban commented 4 years ago

Thank you @mrward . I upgraded to NuGet Package Management Extensions v 0.22 and it solved the problem.

aslamovyura commented 4 years ago

Thank you @mrward !