Help with plugin example (1 Viewer)

Baboonanza

Retired Team Member
  • Premium Supporter
  • February 5, 2010
    143
    57
    North London
    Home Country
    United Kingdom United Kingdom
    Hi,

    I'm failing at the first hurdle of plugin development and I need some help!

    I've used the plugin guide from here, following the steps to create a GUIWindow plugin.

    But I cannot get the plugin to show up in the configuration window. The DLL is clearly being found because you get this error in the log:
    Code:
    2010-06-18 18:24:23.956655 [Debug][Config Main(1)]: PluginsNew: loadPlugins C:\Program Files (x86)\Team MediaPortal\MediaPortal\Plugins\windows\TestPlugin.dll
    2010-06-18 18:24:23.959155 [Warn.][Config Main(1)]: PluginsNew: C:\Program Files (x86)\Team MediaPortal\MediaPortal\Plugins\windows\TestPlugin.dll has a bad image format
    but nothing appears in the window.

    I'm using:
    Visual Studio Express 2010
    Windows 7 Home 64bit
    MediaPortal 1.1.0 RC4

    I've attached my project. Am I missing something obvious? Could this be a VS Express 2010 problem?

    Thanks in advance!
     

    Attachments

    • TestPlugin.zip
      14.6 KB

    Spragleknas

    Moderator
  • Team MediaPortal
  • December 21, 2005
    9,474
    1,822
    Located
    Home Country
    Norway Norway
    Hi.
    Moved your thread to General Development (Description: "Working on your own plugin and got stuck? Post your codeing question here").

    Hopefully you'll get some help here. I also left a 1 month redirect, so... :)
     

    Migue

    Retired Team Member
  • Premium Supporter
  • January 27, 2006
    381
    305
    Florida
    Change your project's CPU target from "Any" to x86. MP is a 32-bit application so plugins or programs that reference its libraries must also be 32-bit only.

    EDIT: I was wrong. I was thinking of an external program that references MP libraries, not a plugin.
     

    Baboonanza

    Retired Team Member
  • Premium Supporter
  • February 5, 2010
    143
    57
    North London
    Home Country
    United Kingdom United Kingdom
    Fantastic, thanks for the help guys.

    Change your plugin target framework to .NET 3.5 from .NET 4.
    That was the solution :)

    Well, I got one step closer :(. While the plugin now appears in the config dialog it isn't being recognised as a window plugin, despite having a GUIWindow derived class. ie it doesn't appear in the 'home' menu and the context menu in the configuration window doesn't contain 'Show in home' or 'Show in plugins".

    I've tried everything I can think of. Any further ideas?
     

    Baboonanza

    Retired Team Member
  • Premium Supporter
  • February 5, 2010
    143
    57
    North London
    Home Country
    United Kingdom United Kingdom
    Okay, I've now also tried it with Express 2008. No differece.

    Today I have the chance to compile it with Express 2010 on XP, so we'll see if that works.
     

    Baboonanza

    Retired Team Member
  • Premium Supporter
  • February 5, 2010
    143
    57
    North London
    Home Country
    United Kingdom United Kingdom
    :oops: I can't believe I didn't notice that, it's even in the <summary>!

    Thanks for your help, I'll give it a go tonight.
     

    Baboonanza

    Retired Team Member
  • Premium Supporter
  • February 5, 2010
    143
    57
    North London
    Home Country
    United Kingdom United Kingdom
    I've got everything working now. Thanks for your help!

    I've updated the Wiki Plugin Developers guide to include the information from this thread plus how to debug DLLs in VS Express (which lacks the GUI options of Visual Studio proper).
     

    Users who are viewing this thread

    Top Bottom