Problem
There is no easy way to set ProgId/Guid for a Custom Task Pane Helper component (ExcelCustomTaskPaneAddIn), which might cause a problem in restricted environments.
Details
ExcelCustomTaskPaneAddIn is an internal class and the instance is being created in the GetCTPFactory method inside CustomTaskPaneFactory:
// Register and create addin
_addin = new ExcelCustomTaskPaneAddIn { DnaLibrary = DnaLibrary.CurrentLibrary };
ExcelComAddInHelper.LoadComAddIn(_addin);
LoadComAddIn checks if the class has ProgId/Guid attribute, and if not it generates id based on the xll path. It works well if you e.g. extend ExcelRibbon class, but ExcelCustomTaskPaneAddIn is an internal class, so you cannot do much with it, therefore it always uses generated id.
Problem
There is no easy way to set ProgId/Guid for a Custom Task Pane Helper component (
ExcelCustomTaskPaneAddIn), which might cause a problem in restricted environments.Details
ExcelCustomTaskPaneAddInis an internal class and the instance is being created in theGetCTPFactorymethod insideCustomTaskPaneFactory:LoadComAddInchecks if the class has ProgId/Guid attribute, and if not it generates id based on the xll path. It works well if you e.g. extendExcelRibbonclass, butExcelCustomTaskPaneAddInis an internal class, so you cannot do much with it, therefore it always uses generated id.