0

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.

0rube
  • 72
  • 1
  • 11

1 Answers1

0

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

  • Nope - still same error message shown. Thank you very much though for trying to help me. ~.~ – 0rube Nov 27 '14 at 06:46
  • Ok, sorry. Instead I think it is because your AddIn annotation name does not match your ActionAddIn name. So, change this [AddIn("Backup HyperV VM")] to this [AddIn("Backup VMs Add-In")] and it should work. – Kevin Snow Dec 04 '14 at 17:13
  • Hm...didn't help either. I am kinda at the point of giving this up, because I can't even get the Microsoft demo project to work properly (by the way..it comes broken!). ^^ Do you have a working example? – 0rube Dec 15 '14 at 07:25
  • Yes, I have a working example. I am currently developing an Add-in myself. Not sure how I can get you the working code? – Kevin Snow Dec 15 '14 at 21:22
  • Do you have Dropbox or sth. like that? – 0rube Dec 16 '14 at 06:23
  • I have placed the code in my Dropbox, https://www.dropbox.com/sh/zp1nbc674mkkknw/AAAA9T8UBn3g_OujcjMse5_za?dl=0 – Kevin Snow Dec 16 '14 at 19:25