Add-In Component not found in Assembly | SCVMM Add-In SDK

300 views Asked by At

I am programing an add-in for the scvmm and I have no Idea why this is happening:

This is my uncompiled add-in.dll:

[AddIn("Backup HyperV VM")]
public class BackupHyperVVM : ActionAddInBase
{
    public override bool CheckIfEnabledFor(IList<ContextObject> contextObjects)
    {
        if (contextObjects != null && contextObjects.Count > 0)
            return true;

        return false;
    }

    public override void PerformAction(IList<ContextObject> contextObjects)
    {

    }

    private void execPSS(string param) //Execute a powershell script within the SCVMM -- need to make shure I run it on the right host
    {
        PowerShellContext.ExecuteScript<ServerConnection>(param,
            (items, error) =>
            {
                //code to set server info here
                if (error == null)
                {
                    //on Success
                }
                else
                {
                    //on Error
                }
            });
    }
}

And this is the manifest.xml:

<ConsoleAddIn
  xmlns="urn:VMM-AddIns-v1-CTP"
  Name="VMM Backup Add-In"
  Version="0.0.1.0"
  Author="..."
  Description="This Add-In (once finished) provides the user with a GUI solution to backup and restore VMs from a Hyper-V host."
  FolderName="BackupAddIn"
  TrustLevel="Full">
  <ActionAddIn
    Name="Backup VMs Add-In"
    Contexts="Cluster"
    AssemblyName="add-in.dll"
    ShowInContextMenu = "True"
    ActionType="Code"    
    Icon="Ico.ico">
    <ButtonLabel>
      Backup VM
    </ButtonLabel>
  </ActionAddIn>
</ConsoleAddIn>

When I zip the files and try to load the add-in, I get this error (I translated it from German):

The Add-In-Component "Backup VMs Add-In" can't be found in the Assembly "add-in". Possible reasons: 1. The Attribute "Name" of the Add-In is not matching the Name defined in the Attribute "AddIn" in the Add-In-Class. 2. The Add-In-Class is not public.

Thank you for your help..I have no idea how to solve this, even the docs couldn't help me.

1

There are 1 answers

6
Kevin Snow On

From what I can see, you need to change the manifest entry from AssemblyName="add-in.dll" to AssemblyName="BackupHyperVVM".