NuGet packages for Excel-DNA v1.8.0-rc are now available.
I hope to make a final release soon, around the middle of May.
The main changes for this version are:
* Add support for .NET 7/8 and RollForward property.
* Add support for custom runtimeconfig.json file.
* Migrate Registration helpers to main assembly.
* Add admin rights check before accessing machine hive for COM registration
* Support thread-safe RTD wrappers and ExcelRtdServers
* Support LosslessObservable option for ExcelAsyncUtil.Observe
* Add simple logging configuration under .NET 6 for IntelliSense.
## GitHub Sponsors
The best way to encourage ongoing development and support of Excel-DNA is to sign up as a
GitHub Sponsor. Higher tiers also provide online support sessions, where I am happy to advise or help you get unstuck with your add-in development. Thank you very much to all the existing sponsors!
I also offer more formal corporate maintenance and support agreements for those using Excel-DNA in a mission critical setting.
Public support is provided via the
Excel-DNA Google group.
## .NET Runtime - Status and Recommendations
Excel-DNA v1.8.0 supports:
* .NET Framework (v4.6.2 or later), and
* .NET 6/7/8+ (v6.0.2 or later) with the 'Desktop Runtime' installed.
There is a hard limitation from the .NET Core side (for us this means .NET 6+) that different versions of .NET Core cannot load into the same process.
So, an add-in built targeting .NET 6 cannot run in the same Excel instance as an add-in targeting .NET 8, and vice versa.
(One of these could run together with add-ins targeting .NET Framework, though.)
To side-step (postpone?) dealing with this problem, Excel-DNA has previously only supported .NET 6 (in addition to .NET Framework).
This was the approach up to version 1.7.0.
With the recent release of .NET 8 as a new Long-Term-Support (LTS) version, and annual releases to continue, we need a more nuanced policy regarding the .NET core runtime support.
What seems like a reasonable approach is to give the add-in developer some options on how to deal with the versions, by:
* Allowing the add-in to target newer .NET versions
* Supporting the “RollForward” setting in the project file (basically passing this through to the .NET runtime loading code).
This will allow an add-in to specify a few options, in addition to the target runtime version:
* <RollForward>LatestMinor</RollForward> Only load if the target (major) runtime version can be loaded, loading into the current patched version.
* <RollForward>Major</RollForward> Load into a newer runtime version if it is already loaded, but load the target if no runtime loaded yet.
* <RollForward>LatestMajor</RollForward> If no runtime is loaded yet, load the newest runtime installed
The last case would allow an add-in targeting .NET 6 to work together with an add-in targeting .NET 8.
The LatestMajor policy is the default for libraries from NuGet packages under .NET Core, where a library targeting .NET 6 will load into a .NET 8 process with no problems.
Although every annual version of the .NET runtime is now a ‘major’ version, with no compatibility guarantees, it does seem like care is taken to minimize breaking changes between versions. In our experiments, the Excel-DNA code and add-in libraries work under .NET 8 without problems once the add-in runtime loader parts are adjusted.
Excel-DNA now offers enough rope for add-in developers to shoot themselves and other add-in developers in the foot. For environments with tight control over what add-ins run in Excel, there shouldn’t be problems. But for add-ins that are distributed more widely (say add-ins provided to clients for access to a company’s data or models remotely) it becomes more difficult to decide what to do. My guidance for such cases would be to stick with .NET Framework 4.x, which has no version compatibility issues, and will be stably supported for the foreseeable future.
## Other changes
I'm happy to elaborate on any of the other changes for this version - please let me know what specific items you are interested in.
-Govert