Issues from upgrading from dotnet v4.8 framework to dotnet8

57 views
Skip to first unread message

Alfred Manoj

unread,
Oct 7, 2025, 3:02:07 PMOct 7
to Excel-DNA
Hello Excel-DNA Team,

We’re migrating a WPF-based Excel-DNA project from .NET Framework 4.8 to .NET 8, and we’ve run into two key issues:

Project Setup
  • Previously used assembly references to ExcelDna.Integration.dll and Microsoft.Office.Interop.Excel.dll.
  • Two .dna files (32-bit and 64-bit) with corresponding .xll files committed to the repo.
  • Now using NuGet packages:
    • ExcelDna.AddIn (v1.9.0)
    • ExcelDna.Interop (v15.0.1)
  • Target framework: net8.0-windows
  • Ribbon UI defined in .dna with fallback to CommandBar (onAction).
  • Ribbon uses RunTagMacro for invocation.
Issues Encountered
  1. PlatformNotSupportedException

    • Occurs when launching the .xll files generated via the new setup.
    • Despite the exception, fallback CommandBar UI loads and functions.
    • Exception message is vague, but functionality continues.
  2. Ribbon UI Not Loading

    • Ribbon defined in .dna does not appear in Excel.
    • No visible error unless fallback UI is triggered.
    • RunTagMacro callbacks are not invoked (which are defined in the ribbonui). But we do have a defined call invoking Run("") from the code which works.
Troubleshooting Done
  • We do have .NET Desktop Runtime 8.0 installed.
  • Added RuntimeVersion="v8.0" to the root <DnaLibrary> node as suggested in GitHub Discussion #788. [github.com]
  • Confirmed .xll files are generated for both 32-bit and 64-bit.
  • Ribbon XML and callbacks are unchanged from the working .NET Framework version.
Questions
  1. What could be the root cause of the PlatformNotSupportedException in this context?
  2. Are there specific changes or limitations in .NET 8 that affect Ribbon UI loading?
  3. Is RunTagMacro fully supported in .NET 8 Excel-DNA add-ins?
  4. Are there additional configuration steps needed to enable Ribbon UI in .NET 8?
Thanks a lot in advance for your help and for maintaining such a powerful tool!

Regards,
Alfred

Govert van Drimmelen

unread,
Oct 10, 2025, 4:28:12 PMOct 10
to Excel-DNA
Hi Alfred,

Can you check whether this add-in builds and works fine on your system?
govert/TestNet8Ribbon

Once that is working fine, you should be able to find the snag in your project.

I don't this is the cause of your PlatformNotSupportedException, I suggest you migrate from the explicit .dna files in your project to having the ribbon files embedded as resources in your C# project. There are different ways to do this in the project, and load again when you need to. The project shows one that is more verbose on the project file, but simpler in the code. RunTagMacro is supported as before.

-Govert
Reply all
Reply to author
Forward
0 new messages