Jump to content

Updated Plugin Docs for .NET Core


Luke

Recommended Posts

mutu310

I submitted a pull request. Give it a shot. Make sure you have visual studio 2017 installed + the .net core 2.0 sdk.

Thanks for the effort, but this is giving the same problems as I was getting. The plugin fails to show in the plugins screen and running any of the scheduled tasks throws this exception:

 

2017-09-09 07:37:12.034 Error App: LoaderException: Declaration referenced in a method implementation cannot be a final method. Type: 'MediaBrowser.Channels.BlurN.Plugin'. Assembly: 'MediaBrowser.Channels.BlurN, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'.

 

Tested on 3.2.30.0 stable on Windows 10.

Edited by mutu310
Link to comment
Share on other sites

Ok, this entire topic here is all about the beta server + .net core server. So the work I did is targeting that. We'll have a new stable out soon enough. My suggestion would be to just stick with this for now.

Link to comment
Share on other sites

mutu310

Ok, this entire topic here is all about the beta server + .net core server. So the work I did is targeting that. We'll have a new stable out soon enough. My suggestion would be to just stick with this for now.

So in the meantime all the users on stable which are the majority especially if they have a NAS like Synology have to deal with errors popping up every few minutes? Analytics are showing me a big drop in userbase as people are just uninstalling the plugin because it's broken. It will probably take a while for core to make it onto Synology, no?
Link to comment
Share on other sites

what i submitted in the pull request is dual compatible with both frameworks, starting with the next release of the server.

  • Like 1
Link to comment
Share on other sites

mutu310

what i submitted in the pull request is dual compatible with both frameworks, starting with the next release of the server.

 

OK, hope it goes stable ASAP on all platforms :)

Link to comment
Share on other sites

@@Luke if a plugin targets dotnet core 2.0, can it use 3rd party nuget packages? I've tried to do this, but the runtime fails to load the assembly - i've simply copied the .dll file of the dependcy to the emby server directory. This worked before but fails with the emby server dotnet core version.

Link to comment
Share on other sites

The nuget package is now out of beta. This is just for your own information. It doesn't require submitting another new update. Thanks.

Link to comment
Share on other sites

Gamebrowser compiles just fine in my testing. Even another user was able to build and submit a pull request on it. Thanks.

Link to comment
Share on other sites

Frank Drebin

Thanks for replying Luke.

 

When i compile it, it gives me 13 errors:

 

Error CS0246The type or namespace name 'XmlDocument' could not be found (are you missing a using directive or an assembly reference?)

 

Im using VS2017.

Link to comment
Share on other sites

  • 9 months later...

Great news everyone. I have updated and simplified the plugin building instructions. Now that we are requiring a higher minimum mono version, we can now assume that all platforms support .NET Standard 2.0, and therefore dual targeting is no longer necessary. That means you can produce one single plugin binary that will run on all platforms supported by Emby Server.

 

The next time you update your plugin, please do the following:

  • In the csproj, set your target frameworks to netstandard2.0. (netstandard 1.3, net46 no longer needed)
  • Update to the latest nuget packages

Important - This is just for your information and does not require you to immediately publish a plugin update.

 

@@Sven

@@mutu310

@@chef

@@radeon

@@Inrego

@@softworkz

@@reggi

@@krustyreturns 

@@Frank Drebin

@@snazy2000

@@hamstercat

@@Aphid

@@BeppoMonkeyBoy

@@flexage

@@pünktchen 

@t.andre

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...