-
I have made an add-In buildt with .NET 6.0.11 and with Excel DNA 1.6.1-beta1. The add-in is built as an FDD (Framework Dependent Deployment) application. The Add-In runs fine on my machine which has .NET 6 SDK installed. But on a users machine it fails during initialization with the following error message: My question: Any clue on what causes the error (failure of load_hostfxr())? And how to fix it? |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 5 replies
-
You should only need the .NET 6 runtime, not the SDK. One reason for load failures has been anti-virus programs blocking Excel-DNA add-in. Maybe you could check that a bit. If none of these seem to be the issue, please write back - I'd be keen to help figure out what is going wrong. |
Beta Was this translation helpful? Give feedback.
-
Oh great - I didn't even think about that! We'll have a look the error message and add some documentation for this. |
Beta Was this translation helpful? Give feedback.
-
Trying to revive this issue as I’ve got exactly the same problem with my user machines. That happens even with the arch-simple ExcelDna “SayHello” example:
My machine loads Dna6-AddIn.xll without any issue while the user machine has the error that @tvidvei has posted. I first thought .Net 6 runtime was missing on the client but you can see below it is installed. Here is a comparison of the User vs Dev profile:
Dev
Both machine uses same Excel version: Microsoft® Excel® for Microsoft 365 MSO (Version 2208 Build 16.0.15601.20676) 32-bit I’ve tried everything and looked online but apart from this thread I can’t find any help on this error. To give a bit of feedback on our project, we are trying to migrate our ExcelDna solution from .Net Framework 4.7.2 to .Net 6.0 and we’ve just spotted this problem. Is there anything we're missing on the client side to get the add-in running? |
Beta Was this translation helpful? Give feedback.
-
@Hydraxize I think the problem is that you only have the 64-bit version of the .NET 6 runtime installed, but on the problem machine you are running the 32-bit version of Excel. On your development machine you have both 32-bit and 64-bit versions of .NET installed (that part under 'Other architectures found'). |
Beta Was this translation helpful? Give feedback.
Oh great - I didn't even think about that! We'll have a look the error message and add some documentation for this.