diff --git a/RhSolutions.AddIn/AddIn/RhSolutionsAddIn.cs b/RhSolutions.AddIn/AddIn/RhSolutionsAddIn.cs index a7f6796..38cea15 100644 --- a/RhSolutions.AddIn/AddIn/RhSolutionsAddIn.cs +++ b/RhSolutions.AddIn/AddIn/RhSolutionsAddIn.cs @@ -25,7 +25,6 @@ public sealed class RhSolutionsAddIn : IExcelAddIn .AddSingleton() .AddSingleton() .AddSingleton() - .AddSingleton() .AddTransient(); Services.AddSingleton(); @@ -42,6 +41,12 @@ public sealed class RhSolutionsAddIn : IExcelAddIn Services.AddTransient() .AddTransient(s => s.GetService()); + Services.AddSingleton(); + Services.AddTransient() + .AddTransient(s => s.GetService()); + Services.AddTransient() + .AddTransient(s => s.GetService()); + Services.AddSingleton(); ServiceProvider = Services.BuildServiceProvider(); diff --git a/RhSolutions.AddIn/Controllers/RibbonController.cs b/RhSolutions.AddIn/Controllers/RibbonController.cs index 6d234e8..deb56b0 100644 --- a/RhSolutions.AddIn/Controllers/RibbonController.cs +++ b/RhSolutions.AddIn/Controllers/RibbonController.cs @@ -29,7 +29,8 @@ public class RibbonController : ExcelRibbon