Hello,
I am working on a SCVM 2012 SP1 - add-in.
I tried doing the same as mentioned in this SCVMM 2012 SP1 Add-in topic - "Open a Web Browser from the Ribbon", just only the manifest.xml with ConsoleAddIn and a ActionAddIn with ActionType="URL" and ActionParam="google page"
.. I zipped them to the same folder name as set in manifest, but when I try to import this add-in using wizard, it crashed my console every time i tried importing it.
Sample code as below -
<ConsoleAddIn
xmlns="urn:VMM-AddIns-v1-CTP"
Name="VMM View Add-In Examples"
Version="1.0.0.0"
Author="Microsoft Corporation"
Description="A collection of View Add-in examples."
FolderName="ViewAddInExamples"
TrustLevel="Full">
<ActionAddIn
Name="Web browser"
Icon="VMStateSaved.ico"
Contexts="VM"
ShowInContextMenu=True
ActionType="URL"
ActionParam="http://www.google.com/">
<ButtonLabel>
Browser
</ButtonLabel>
</ActionAddIn>
<ActionAddIn
Name="External Application"
Icon="VMStateSaved.ico"
Contexts="AllHomeTabs"
ActionType="Application"
ActionParam="C:\Windows\System32\calc.exe">
<ButtonLabel>
My calculator
</ButtonLabel>
</ActionAddIn>
</ConsoleAddIn>
Does anyone see wrong in the syntax or anything? I tried Context value with "VM" and "AllHomeTabs" with no luck.
So I added a ViewAddin and override CreateViewControl() to open a webbrowser instance and set url to navigate and return this frameworkElement. This is what is available in sample code. With this I was able to import console add-in successfully and launch browser.
But I would like to know if method in the afore mentioned topic actually works or not and if i works then what is possible way to fix my crash issue?
Tracelogs show a inner exception - "Object reference not set to an instnace of an object"
InnerException: System.NullReferenceException
HResult=-2147467261
Message=Object reference not set to an instance of an object.
Source=Microsoft.VirtualManager.UI.AddIns.Management
StackTrace:
at Microsoft.VirtualManager.UI.AddIns.ManifestLoader.LoadGeneralAddInDetails(XmlReader xmlReader, AddInDetails addInDetails)
at Microsoft.VirtualManager.UI.AddIns.ManifestLoader.LoadManifestFromStream(Stream manifestStream)
at Microsoft.VirtualManager.UI.AddIns.XmlFileManifestLoader.LoadManifestFromStream(Stream manifestStream)
at Microsoft.VirtualManager.UI.AddIns.AddInPackageInspector.ValidateAddInManifestFile(AddInPackageInspectionInfo inspectionInfo)
at Microsoft.VirtualManager.UI.AddIns.AddInPackageInspector.InspectAddInPackage(AddInPackageInspectionInfo inspectionInfo)
at Microsoft.VirtualManager.UI.AddIns.AddInPackageInspector.OnInspectionWorkerDoWork(Object obj, DoWorkEventArgs args)
at System.ComponentModel.BackgroundWorker.OnDoWork(DoWorkEventArgs e)
at System.ComponentModel.BackgroundWorker.WorkerThreadStart(Object argument)
Also tried to import same zip file into another SCVMM 2012 SP1 set-up with same result - console crashes there as well.
Since this feature is quite new and could not find much information on forums as well.
Any help, greatly appreciated.
Thanks,
Paras