locked
Creating a Console Tab RRS feed

  • Question

  • Worked through the MSDN steps for creating a WHS console tab, and "deployed" (copied) it to
    %systemdrive%\Program Files\Windows Home Server\  but the tab did not  show up.  Tried rebooting, verified exact names, etc.. still no luck.

    Any suggestions?   Any WHS component logging that may help?

    TIA
    -Ed

    Monday, April 9, 2007 8:49 PM

Answers

  •  

     

     Thanks to the Jays!  The undocumented step to get this working is to match the assembly namespace and dll name.

     

    Below is a working C# snip for a tab extension.  Hope this saves others some time.

     

    -Ed

     

     

    Code Snippet

    using System;

    using System.Collections.Generic;

    using System.Text;

    using System.Drawing;

    using System.Windows.Forms;

    using Microsoft.HomeServer.Extensibility;

     

    //Note: final namespace suffix (TestTab in this case)

    //and .dll`assembly name

    //need to match (HomeServerConsoleTab.TestTab in this case)

     

    namespace Microsoft.HomeServer.HomeServerConsoleTab.TestTab

    {

    // The class declaration

    public class HomeServerTabExtender : Microsoft.HomeServer.Extensibility.IConsoleTab

    {

    private int width;

    private int height;

    private IConsoleServices services;

    private Control tabControl;

    // The constructor

    public HomeServerTabExtender(int width, int height, IConsoleServices consoleServices)

    {

    this.width = width;

    this.height = height;

    this.services = consoleServices;

    tabControl = new Panel();

    tabControl.Width = width;

    tabControl.Height = height;

    }

    public string TabText { get { return "My Tab Name"; } }

    public Bitmap TabImage

    {

    get

    {

    return WHS1.Properties.Resources.TabImage;

    }

    }

    public Control TabControl { get { return tabControl; } }

    public bool GetHelp()

    {

    return false;

    }

     

    public Guid SettingsGuid { get { return Guid.Empty; } }

     

     

    } //End class HomeServerTabExtender

    }

     

    Wednesday, April 11, 2007 12:04 AM

All replies

  • I'm having the same problem. Followed the steps to a T, but no tab.

    Has anyone been able to create a tab?

     

    Thanks,

    Jay

    Tuesday, April 10, 2007 3:35 AM
  • I've been looking at the SDK documentation. I honestly don't think the console tutorial is anywhere near complete enough to give you a functional add-in right now, but I couldn't tell you what's missing without a lot of work. The platform API tutorial looks more promising.
    Tuesday, April 10, 2007 4:28 AM
    Moderator
  • I have to agree.  Did everything twice to double-check - including creating an installer (just in case they are looking for something special) and couldn't get it to show up.

    Anyone get this to work yet and want to share their process/code?

     

     Ken Warren wrote:
    I've been looking at the SDK documentation. I honestly don't think the console tutorial is anywhere near complete enough to give you a functional add-in right now, but I couldn't tell you what's missing without a lot of work. The platform API tutorial looks more promising.

     

    __________________________

    Doug Berrett

    WebGuide4

    dberrett@asciiexpress.com

    www.asciiexpress.com/webguide

    Tuesday, April 10, 2007 12:27 PM
  •  EdHolloway wrote:
    Worked through the MSDN steps for creating a WHS console tab, and "deployed" (copied) it to
    %systemdrive%\Program Files\Windows Home Server\  but the tab did not  show up.  Tried rebooting, verified exact names, etc.. still no luck.

    Any suggestions?   Any WHS component logging that may help?

    TIA
    -Ed

    Ed,

    I don't have access to my WHS machine right now. However I do have a working WHS console tab & settings tab in Beta 2.

     

    The naming of the console tabs are very *very* specific. The assembly name needs to match, the namespace within the assembly needs to match, the class name needs to match.

     

    The SDK docs mention the assembly & class name, however I don't remember seeing anything on the namespace. My tabs wouldn't load with any old namespace names. I used Reflector to see how the other console tab add-ins were named to figure out how to name, once I had the all the names what WHS expected, my console tab & settings tabs come up without any real problems (disclaimer its a beta, so there's bound to be some problems ;-))

     

    Jay

    Tuesday, April 10, 2007 3:24 PM
  •  Jay B. Harlow wrote:

    EdHolloway wrote:
    Worked through the MSDN steps for creating a WHS console tab, and "deployed" (copied) it to
    %systemdrive%\Program Files\Windows Home Server\ but the tab did not show up. Tried rebooting, verified exact names, etc.. still no luck.

    Any suggestions? Any WHS component logging that may help?

    TIA
    -Ed

    Ed,

    I don't have access to my WHS machine right now. However I do have a working WHS console tab & settings tab in Beta 2.

    The naming of the console tabs are very *very* specific. The assembly name needs to match, the namespace within the assembly needs to match, the class name needs to match.

    The SDK docs mention the assembly & class name, however I don't remember seeing anything on the namespace. My tabs wouldn't load with any old namespace names. I used Reflector to see how the other console tab add-ins were named to figure out how to name, once I had the all the names what WHS expected, my console tab & settings tabs come up without any real problems (disclaimer its a beta, so there's bound to be some problems ;-))

    Jay



    Thanks Jay.  I was just doing a little reflecting myself :-) and was headed down that path.  I'll see what is in there and try.  If you get a chance, please do post what you have.
    Tuesday, April 10, 2007 3:36 PM
  • I finally got a tab to work. After using Reflections also, I noticed the namespace was named  'Microsoft.HomeServer.HomeServerConsoleTab.Money'.

    'Money' is what I called my tab and dll name.

     

    Jay

    Tuesday, April 10, 2007 11:35 PM
  •  

     

     Thanks to the Jays!  The undocumented step to get this working is to match the assembly namespace and dll name.

     

    Below is a working C# snip for a tab extension.  Hope this saves others some time.

     

    -Ed

     

     

    Code Snippet

    using System;

    using System.Collections.Generic;

    using System.Text;

    using System.Drawing;

    using System.Windows.Forms;

    using Microsoft.HomeServer.Extensibility;

     

    //Note: final namespace suffix (TestTab in this case)

    //and .dll`assembly name

    //need to match (HomeServerConsoleTab.TestTab in this case)

     

    namespace Microsoft.HomeServer.HomeServerConsoleTab.TestTab

    {

    // The class declaration

    public class HomeServerTabExtender : Microsoft.HomeServer.Extensibility.IConsoleTab

    {

    private int width;

    private int height;

    private IConsoleServices services;

    private Control tabControl;

    // The constructor

    public HomeServerTabExtender(int width, int height, IConsoleServices consoleServices)

    {

    this.width = width;

    this.height = height;

    this.services = consoleServices;

    tabControl = new Panel();

    tabControl.Width = width;

    tabControl.Height = height;

    }

    public string TabText { get { return "My Tab Name"; } }

    public Bitmap TabImage

    {

    get

    {

    return WHS1.Properties.Resources.TabImage;

    }

    }

    public Control TabControl { get { return tabControl; } }

    public bool GetHelp()

    {

    return false;

    }

     

    public Guid SettingsGuid { get { return Guid.Empty; } }

     

     

    } //End class HomeServerTabExtender

    }

     

    Wednesday, April 11, 2007 12:04 AM
  • Thanks for sharing that, Ed
    Thursday, April 26, 2007 8:35 PM
  •  

    Yes - thank you.  This helped indeed. 

     

    One catch that's not very clear - the dll name is still HomeServerConsoleTab.yourame.dll.  So there's no "Microsoft .HomeServer" in the dll name.

     

     

    Friday, July 6, 2007 1:17 AM