Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unhandled exception when using Plugin RpcServer #198

Closed
vncoelho opened this issue Mar 25, 2020 · 10 comments
Closed

Unhandled exception when using Plugin RpcServer #198

vncoelho opened this issue Mar 25, 2020 · 10 comments

Comments

@vncoelho
Copy link
Member

neo> Unhandled exception. System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.AspNetCore.ResponseCompression, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'. The system cannot find the file specified.

File name: 'Microsoft.AspNetCore.ResponseCompression, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'
   at Neo.Plugins.RpcServer.<>c.<OnPluginsLoaded>b__20_2(IServiceCollection services)
   at Microsoft.AspNetCore.Hosting.WebHostBuilder.<>c__DisplayClass10_0.<ConfigureServices>b__0(WebHostBuilderContext _, IServiceCollection services)
   at Microsoft.AspNetCore.Hosting.WebHostBuilder.BuildCommonServices(AggregateException& hostingStartupErrors)
   at Microsoft.AspNetCore.Hosting.WebHostBuilder.Build()
   at Neo.Plugins.RpcServer.OnPluginsLoaded()
   at Neo.NeoSystem..ctor(String storageEngine) in /opt/neoLib/src/neo/NeoSystem.cs:line 39
   at Neo.CLI.MainService.Start(String[] args)
   at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__139_1(Object state)
   at System.Threading.QueueUserWorkItemCallbackDefaultContext.Execute()
   at System.Threading.ThreadPoolWorkQueue.Dispatch()
   at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()
@vncoelho vncoelho changed the title Issue with RpcServer Plugin RpcServer Mar 25, 2020
@vncoelho vncoelho changed the title Plugin RpcServer Unhandled exception when using Plugin RpcServer Mar 25, 2020
@shargon
Copy link
Member

shargon commented Mar 26, 2020

We will need dependecies in plugins

@vncoelho
Copy link
Member Author

Do you know which dependencies to install, @shargon?
Currently this problem is blocking the use on Ubuntu Bionic.

@vncoelho
Copy link
Member Author

I read about adding <PackageReference Include="Microsoft.AspNetCore.App" />, however, I had problem of compatibility with netstandard2.1.

@shargon
Copy link
Member

shargon commented Mar 30, 2020

It should be Microsoft.AspNetCore.ResponseCompression

@vncoelho
Copy link
Member Author

vncoelho commented Mar 30, 2020

error NU1202: Package Microsoft.AspNetCore.App 2.1.1 is not compatible with netstandard2.1 (.NETStandard,Version=v2.1). Package Microsoft.AspNetCore.App 2.1.1 supports: netcoreapp2.1 (.NETCoreApp,Version=v2.1)

I did not understand what you mean, @shargon.

I tried this package following this here: dotnet/aspnetcore#4545

@shargon
Copy link
Member

shargon commented Mar 30, 2020

If you publish the module, and copy Microsoft.AspNetCore.ResponseCompression.dll to neo-cli path, i think that it should work, but it's something to fix it

@vncoelho
Copy link
Member Author

I am not being able to find this Microsoft.AspNetCore.ResponseCompression.dll after publishing the module. In which folder is it supposed to be?

@vncoelho
Copy link
Member Author

I needed to include this on the .csproj:

    <CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
    <RestoreProjectStyle>PackageReference</RestoreProjectStyle>

In order to have access to the .dll after publish.

@vncoelho
Copy link
Member Author

vncoelho commented Mar 30, 2020

Solved now, @shargon. RpcServer working with that.
Thanks.
The Microsoft.AspNetCore.ResponseCompression.dl needs to go to the Plugins folder. In fact, it is already described in the Readme.

I need to create a better script for an easier access to it.

Should leave this issue open? Is there a way to make this automatic or simpler?

@shargon
Copy link
Member

shargon commented Mar 31, 2020

I think that we need dependecies for plugins, this should be automatic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants