Error CS0012

Skip to first unread message

Dec 10, 2021, 10:47:03 AM12/10/21
to Excel-DNA

I just opened an older project to update some functionality I am using.

After I upgraded the ExcelDNA.AddIn from version 0.33.9 to 1.5.0 I got the compiler error Error CS0012 The type 'ExcelRibbon' is defined in an assembly that is not referenced. You must add a reference to assembly ' ExcelDNA.AddIn  , Version=0.33.9, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'.

What went wrong? I used the NuGet upgrade feature.

Kind regards,


Govert van Drimmelen

Dec 10, 2021, 2:43:13 PM12/10/21

Hi Dennis,


It’s a strange message (the type was never defined in an assembly with that name, and how does the project remember the old version?)

But you should check that the ExcelDna.Integration file which should be referenced from the new project exists in the right location.

The recent anti-virus confusions have sometime removed this file, leaving an unpacked NuGet package in the NuGet cache that is missing this file.


I suggest you look around, and if it looks fine, check that a new Excel-DNA project works fine.

If that works but the upgraded project is still a mess, you can post the whole build output.


We can also arrange for a paid-for support session and I can try to sort it out remotely.

If you’d like to try that you can contact me directly.



You received this message because you are subscribed to the Google Groups "Excel-DNA" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To view this discussion on the web visit

Dec 12, 2021, 1:56:40 PM12/12/21
to Excel-DNA
Hi Govert,
I think it is because I implemented the ribbon the old way which isn't supported anymore. I solved it by rebuilding the whole project using the "new" wpf ribbons.
Kind Regards,
Reply all
Reply to author
0 new messages