-
Greetings, I am trying to use the ExcelDNA library to create a ribbon for an Excel add-in. I have followed the tutorial for Ribbons in the readme included within the Ribbon Sample verbatim (https://github.com/Excel-DNA/Samples/tree/master/Ribbon). When I run the program without the RibbonController.cs class, it runs perfectly fine and I am able to have the add-in load into Excel without issue. However, once I call the ExcelRibbon class inside RibbonController.cs, Excel will crash upon startup, giving a NullReferenceException error and an AccessViolationException error respectively. I have attached images below of the two error popups + the disassembled code for the NullReferenceException. Originally, I was having a memory access error show, but that was solved by going to Debug --> Options --> General --> Disabling Just My Code. I am using Visual Studio Professional 2022 17.6.3 and .net6.0-windows. The only package in my dependencies is version 1.7.0-rc4 of ExcelDna.AddIn. When 3 of my coworkers ran this code on their computers, they were able to have Excel load the ribbon and button without any issue. We cannot seem to figure out what would be different on my computer that would cause this crash, and I have tried uninstalling and reinstalling Visual Studio to fix it to no avail. Thanks EDIT: When I load my AddIn straight from Excel, it's able to work perfectly fine. It's only when I load it from Visual Studio that this issue is happening. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Issue resolved |
Beta Was this translation helpful? Give feedback.
-
Can you please share a bit of you resolved the issue, or what caused the problem? |
Beta Was this translation helpful? Give feedback.
Issue resolved