ich bastel zur Zeit auch gerade an einem Add-In, jedoch habe ich die letzten 2 Tage vergeblich versucht lediglich einen Tab anzuzeigen.
Hab auch schon überall gesucht, aber noch keine Lösung gefunden.
Hier mal mein C#-Code:
Code: Alles auswählen
using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;
using System.Drawing;
using Microsoft.HomeServer.Extensibility;
namespace Microsoft.HomeServer.HomeServerConsoleTab.InfoTab
{
    public class HomeServerTabExtender : Microsoft.HomeServer.Extensibility.IConsoleTab 
    {
        private InfoTabControl ctrlMain;
        private IConsoleServices services;
        public HomeServerTabExtender(int width, int height, IConsoleServices consoleServices)
        {
            ctrlMain = new InfoTabControl(width, height);
            this.services = consoleServices;
        }
        public Bitmap TabImage
        {
            get
            {
                return Properties.Resources.InfoTabImg;
            }
        }
        public Control TabControl
        {
            get
            {
                return ctrlMain;
            }
        }
        public string TabText
        {
            get
            {
                return "Zusatzinfos";
            }
        }
        public bool GetHelp()
        {
            return false;
        }
        public Guid SettingsGuid 
        { 
            get 
            { 
                return new Guid("010F9EE4-7C90-4ebd-812D-20B6639E844D"); 
            } 
        }
        //public bool Commit()
        //{
        //    return false;
        //}
    }
    internal class InfoTabControl : Panel 
    {
        public InfoTabControl(int width, int heigth)
        {
            Panel pnlMain = new Panel();
            pnlMain.BorderStyle = BorderStyle.FixedSingle;
            pnlMain.SetBounds(0, 0, width, heigth);
            pnlMain.Parent = this;
            Button btnStandby = new Button();
            btnStandby.Name = "btnStandby";
            btnStandby.Text = "Stand-By";
            //btnStandby.Parent = pnlMain;
            btnStandby.Location = new Point(10, 10);
            btnStandby.Size = new Size(250, 25);
            pnlMain.Controls.Add(btnStandby);
        }
    }
}
Default-Namespace: Microsoft.HomeServer.HomeServerConsoleTab.InfoTab
Das MSI-Paket erzeuge ich mit einem WiX-Template, was folgendermaßen aussieht:
Code: Alles auswählen
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2003/01/wi">
  <Product 
	  Id="65786B2F-7A82-4b2f-BDE8-198FF1A9870F" 
	  UpgradeCode="5C070202-9631-4a31-AF5A-98A8D932D61C"
	  Name="Windows Home Server InfoTab" 
	  Language="1033" 
	  Codepage="1252" 
	  Version="0.0.2" 
	  Manufacturer="Max Jaeger">
    <Package 
		Id="70D77374-2A34-4acd-BB17-ED4117D78971" 
		Manufacturer="Max Jaeger"
		Description="Erweiterung der Einstellungen um ein zusätzlichen InfoTab" 
		Comments="Testapplikation" 
		InstallerVersion="200" 
		Compressed="yes" />
    <Media 
		Id="1" 
		Cabinet="HomeServerConsoleTab_InfoTab_cab" 
		EmbedCab="yes" />
	<Property Id="WHSLogo">1</Property>
	<Condition Message="[ProductName] requires Windows Home Server. For more information, please refer to the User Guide.">VersionNT = 502</Condition>
	  <Directory Id="TARGETDIR" Name="SourceDir">
		<Directory Id="ProgramFilesFolder" Name="PFiles">
			<Directory Id="WHS" Name="WHSgrp" LongName="Windows Home Server">
				<Component Id="HomeServerConsoleTab.InfoTab.dll" Guid="296FFF20-A561-45c0-AD6F-EFE69444E553">
					<File Id="HomeServerConsoleTab.InfoTab.dll" Name="InfoTab.dll" LongName="HomeServerConsoleTab.InfoTab.dll" src="D:\Programmierung\C#\Projects\HS_InfoTab\HS_InfoTab\bin\Release\HomeServerConsoleTab.InfoTab.dll" Vital="yes" KeyPath="yes" DiskId="1" />
				</Component>
			</Directory>
		</Directory>
	  </Directory>
    <Feature Id="DefaultFeature" Level="1">
      <ComponentRef Id="HomeServerConsoleTab.InfoTab.dll" />
    </Feature>
  </Product>
</Wix>
Ich hab echt keine Ahnung mehr wo ein Fehler sein könnte. Vielleicht sieht ja jemand direkt den Fehler, ich verzweifel langsam hier.
Die Beispiel-DLL von der Hauptseite (HomeServerConsoleTab.HomeServerBlogTest.dll) funktioniert bei mir jedoch auch nicht. Andere Add-Ins gehen aber.
Wär nett wenn mir jemand helfen könnte.
Falls ich Infos vergessen habe die ihr braucht dann kurz melden.
Gruß
Max


 
 