Problems migrating from .NET Framework to .NET Core

16 views
Skip to first unread message

Eduardo Martinez-Lopez

unread,
Sep 4, 2025, 3:30:05 PM (yesterday) Sep 4
to Excel-DNA
I have been battling a stubborn issue trying to migrate an add-in from .NET Framework to modern .NET. No matter what I do, I get an error from ExcelDna.Host when trying to load the add-in: "It was not possible to find a compatible framework version for .NET Desktop Runtime 6.0.2. x86."

I have tried setting the TargetFramework to net6.0-windows, using <PublishSelfContained>true</PublishSelfContained> to package the runtime with the add-in, upgrading to the pre-release 1.9.0-rc6 version of the Excel-Dna libraries, forcing <RuntimeFrameworkVersion> to 6.0.2 to match what the error message indicates it wants, , settting <RollForward> to Major, Minor, Patch, LatestMajor.... I am out of ideas. At the core of my confusion is that nowhere in my add-in's dependencies,, direct or otherwise, is version 6.0.2 of the .NET Runtime called out, so i don't understand where that dependency comes from.

Can you offer any help? The Add-in worked great when targeting .NET Framework but I need to upgrade it to Core as it is a component of a larger solution that is being migrated, and sub-projects referenced by the add-in must be upgraded to modern .NET.

Eduardo Martinez-Lopez

unread,
Sep 4, 2025, 3:50:15 PM (yesterday) Sep 4
to Excel-DNA
As I continued to debug this issue I finally was able to get it resolved based on a response in another thread in this group. I had to delete the existing .dna files I had in my project. Once those files were deleted I could target .NET 8 without issues. Sorry for the redundant post.
Reply all
Reply to author
Forward
0 new messages