chef 3810 Posted October 27, 2016 Posted October 27, 2016 (edited) Here is my base plugin code using System.Collections.Generic; using System.Threading; using MediaBrowser.Common.Configuration; using MediaBrowser.Common.Plugins; using MediaBrowser.Model.Plugins; using MediaBrowser.Model.Serialization; using MiOSEmbyZWaveControllerCS.Configuration; namespace MiOSEmbyZWaveControllerCS { public class Plugin : BasePlugin<PluginConfiguration>, IHasWebPages { public Plugin(IApplicationPaths applicationPaths, IXmlSerializer xmlSerializer) : base(applicationPaths, xmlSerializer) { Instance = this; // ReSharper disable once DoNotCallOverridableMethodsInConstructor UpdateConfiguration(Configuration); } internal static readonly SemaphoreSlim ResourcePool = new SemaphoreSlim(8, 8); public static Plugin Instance { get; private set; } public override string Name { get { return "MiOs Zwave Controller"; } } public IEnumerable<PluginPageInfo> GetPages() { return new[] { new PluginPageInfo { Name = "MainPluginConfigurationPage", EmbeddedResourcePath = GetType().Namespace + ".MainPluginConfigurationPage.html" }, new PluginPageInfo { Name = "ClientConfigPage", EmbeddedResourcePath = GetType().Namespace + ".ClientConfigPage.html" } }; } } } My plugin will not show up in the plugin page. Could you please help me figure out what I've done wrong? I am using vs2015, and I am building to .net 4.6 Usually the plugin will at least show up In the list of installed plugins, but it does not. Edited October 27, 2016 by chef
Luke 42077 Posted October 27, 2016 Posted October 27, 2016 First, do not do work in your constructor, so remove the UpdateConfig call. Second, remember these changes are currently only applicable to the dev server, not beta or stable. 1
chef 3810 Posted October 28, 2016 Author Posted October 28, 2016 I finally have some time to get back at this. Does I it matter if I don't use vs2015? After installing the frameworks that accompany vs2015, I can target them in vs2012, which I have grown quite fond of, since I have resharper installed on it, and it is a verified version not a community version like vs2015. I also am not running win 10 on the dev machine. Is this going to cause issues moving forward? Should I consider an entirely new environment? Thanks for your time.
Luke 42077 Posted October 29, 2016 Posted October 29, 2016 If you can get it to build then it might not matter. I am really not sure. There's just no reason to not use 2015 since the community edition is free. Down the road if we end up requiring plugins to be portable class libraries that still most certainly require 2015 1
chef 3810 Posted October 30, 2016 Author Posted October 30, 2016 Thanks for the response luke. I know some other things have changed in plugin architecture, any idea why I might be experiencing this error: Error (ResourceNotFoundException): Exception of type 'MediaBrowser.Common.Extensions.ResourceNotFoundException' was thrown. 404 When attempting to load the config from ApiClient.getPluginConfiguration in my web code?
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now