Excel DNA .net 6.0

638 views
Skip to first unread message

Hassane Taibi

unread,
Oct 13, 2022, 3:27:10 PM10/13/22
to exce...@googlegroups.com
Hello ,
I have developed an XLL in net 6.0 but I wanted to deploy on it on computers without .net 6.0 installed.Even if use the option selfcontained=true it does not  work .The only solution is to install the .net 6.0 runtime on the computer.Do you have an idea to avoid to install net 6.0

Regards 

Govert van Drimmelen

unread,
Oct 13, 2022, 3:49:40 PM10/13/22
to exce...@googlegroups.com

Hi Hassane,

 

Excel-DNA add-ins that target .NET 6 will require .NET 6 to be installed.

As far as I remember, the “self-contained” application option with .NET 6 is not supported by our scenario where we want to load a library into a native process. I might be mistaken on the details, but I’m quite sure this can’t be done with Excel-DNA v 1.6 as it is.

 

So your options are to install .NET 6 or to target .NET Framework (which is installed as part of Windows).

 

-Govert

--
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 exceldna+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/exceldna/CAOadVu9-dtNhUJT%2Bw%3DGw4Guiub3SjQT84imwWkhnt%2BpNRbm0vA%40mail.gmail.com.

Hassane Taibi

unread,
Oct 25, 2022, 2:03:53 PM10/25/22
to exce...@googlegroups.com
Dear all, I found a solution to avoid to install net 6.0
you have to define the variable DOTNET_ROOT  for x64 DLL and DOTNET_ROOT(x86) for x86 DLL   to specify where you net 6.0  DLLs are stored.

Regards 

Govert van Drimmelen

unread,
Oct 26, 2022, 1:47:47 PM10/26/22
to Excel-DNA
Hi Hassane,
Thank you for posting back - it's good to know that there is a way to point to a local folder with the .NET 6 files as you show.
-Govert

Ricardo Gerbaudo

unread,
Oct 26, 2022, 9:23:02 PM10/26/22
to Excel-DNA
Hi Hassane, I'm having the same issue. 
I'm working on an add-in that runs in a corporate environment, with several IT security policies and restrictions, where the users don't have admin rights. So I'm stuck in .NET Framework 4.8 because they're not able to install .NET 6.
Can you please tell me if in your solution I need to have admin rights to define these variables? I've read something before about these environment variables, but as far as I know you need admin rights to set system env variables.

Hassane Taibi

unread,
Oct 27, 2022, 2:53:03 AM10/27/22
to exce...@googlegroups.com
Hi Ricardo you dont need admin rights

Just use the following Ms dos command

setx  DOTNET_ROOT=yourpathx64

setx 
DOTNET_ROOT(x86)=yourpathx86

Regards



Ricardo Gerbaudo

unread,
Oct 27, 2022, 3:56:47 PM10/27/22
to Excel-DNA
Working like a charm! Thanks a lot Hassane.
Reply all
Reply to author
Forward
0 new messages