Excel DNA 1.8.0 Requires .NET 6?

91 views
Skip to first unread message

Terry Aney

unread,
Jul 2, 2024, 10:45:44 AMJul 2
to Excel-DNA
Upon running the *.xll file, users are receiving:

dna.user.error.png
My project file looks like this and I've only had users install .NET 7.  I didn't want to have to have them install 6 and 7 but maybe required?

dna.project.png
Output from user box for .NET info that received error:
dna.user.net.png

Thanks in advance.

Terry

Terry Aney

unread,
Jul 11, 2024, 8:44:01 AM (11 days ago) Jul 11
to Excel-DNA
I found this commit from @Sergey but a) Haven't looked at c/c++ for 35 years since school, lol, b) can't find any reference to a '6' in the changes.  I thought I might go look to create a PR but that is going to be out of my ability.

I also saw this issue which looked like it might relate, but not sure it does.

Should I just make an issue in the github repository?

Govert van Drimmelen

unread,
Jul 11, 2024, 3:29:52 PM (11 days ago) Jul 11
to Excel-DNA
Hi Terry,

Can you confirm whether you see this problem with a brand new project, where you target "net7.0-windows" and just add the "ExcelDna.AddIn" v1.8.0 package?
I can't test this scenario easily on a machine without .NET 6 installed, but expect it to work fine.
This would help check whether the issue is with your project, or in the Excel-DNA code.

-Govert

Govert van Drimmelen

unread,
Jul 11, 2024, 3:31:21 PM (11 days ago) Jul 11
to Excel-DNA
I suspect you have a .dna file in your project, so your output .dna file is not created from the project properties and would still target the runtime version specified in your own .dna file.

-Govert

Terry Aney

unread,
Jul 12, 2024, 9:47:19 AM (10 days ago) Jul 12
to Excel-DNA
No .dna file.  It is autogenerated by Excel-DNA.  Here is my csproj file.  I'll create a new addin later this today but not seeing anything odd in my current project.

<Project Sdk="Microsoft.NET.Sdk">

    <PropertyGroup>
        <TargetFramework>net7.0-windows</TargetFramework>
        <UseWindowsForms>true</UseWindowsForms>
        <Nullable>enable</Nullable>
        <ImplicitUsings>enable</ImplicitUsings>
        <RootNamespace>KAT.Camelot.Extensibility.Excel.AddIn</RootNamespace>
        <AssemblyName>KAT.Camelot.Extensibility.Excel.AddIn</AssemblyName>
        <KATVersionPrefix>1.0.*</KATVersionPrefix>
    </PropertyGroup>

    <PropertyGroup>
        <!--
            ExcelDna Settings
        -->
        <ExcelDna32BitAddInSuffix>.x86</ExcelDna32BitAddInSuffix>
        <ExcelDna64BitAddInSuffix>%none%</ExcelDna64BitAddInSuffix>
        <ExcelDnaPackXllSuffix>%none%</ExcelDnaPackXllSuffix>
        <ExcelAddInExplicitExports>true</ExcelAddInExplicitExports>
        <ExcelAddInExplicitRegistration>true</ExcelAddInExplicitRegistration>
        <ExcelDnaPublishPath>packed</ExcelDnaPublishPath>
    </PropertyGroup>
    <PropertyGroup Condition="'$(Configuration)'=='Debug'">
        <RunExcelDnaPack>false</RunExcelDnaPack>
        <ExcelDnaCreate32BitAddIn>false</ExcelDnaCreate32BitAddIn>
        <ExcelAddInName>KAT Tools (Debug)</ExcelAddInName>
        <ExcelAddInFileName>KAT.Extensibility.Excel.Debug</ExcelAddInFileName>
    </PropertyGroup>
    <PropertyGroup Condition="'$(Configuration)'!='Debug'">
        <ExcelAddInName>KAT Tools</ExcelAddInName>
        <ExcelAddInFileName>KAT.Extensibility.Excel</ExcelAddInFileName>
    </PropertyGroup>

    <ItemGroup>
        <PackageReference Include="Humanizer.Core" Version="2.14.1" />
        <PackageReference Include="Microsoft.Extensions.Configuration" Version="7.0.0" />
        <PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="7.0.0" />
        <PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="7.0.0" />
        <PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="7.0.0" />

        <PackageReference Include="ExcelDna.AddIn" Version="1.8.0" />
        <PackageReference Include="ExcelDna.IntelliSense" Version="1.8.0" />
        <PackageReference Include="ExcelDna.Registration" Version="1.8.0" />
        <PackageReference Include="ExcelDna.Interop" Version="15.0.1" />
       
        <PackageReference Include="SpreadsheetGear" Version="9.2.28" />
        <PackageReference Include="XLParser" Version="1.7.2" />
    </ItemGroup>

    <ItemGroup>
        <ProjectReference Include="..\..\..\Core\Data\src\Camelot.Data.csproj" />
        <ProjectReference Include="..\..\..\Core\Domain\src\Camelot.Domain.csproj" />
        <ProjectReference Include="..\..\..\Core\Infrastructure\src\Camelot.Infrastructure.csproj" />
        <ProjectReference Include="..\..\..\RBLe\Core\src\Camelot.RBLe.Core.csproj" />
        <ProjectReference Include="..\..\..\Abstractions\Api.Contracts\Excel\src\Camelot.Abstractions.Api.Contracts.Excel.csproj" />
        <ProjectReference Include="..\..\..\Abstractions\Api.Contracts\xDS\src\Camelot.Abstractions.Api.Contracts.xDS.csproj" />
    </ItemGroup>
    <ItemGroup>
        <EmbeddedResource Include="Resources\Ribbon.xml" />
        <EmbeddedResource Include="Resources\ShowScriptBlockMark.png" />
        <EmbeddedResource Include="Resources\Evolution.Admin.Calculations.cs" />
        <EmbeddedResource Include="Resources\Inputs.ascx" />
        <EmbeddedResource Include="Resources\Inputs.ascx_cs" />
        <EmbeddedResource Include="Resources\Inputs.ascx_designer_cs" />
        <EmbeddedResource Include="Resources\Inputs.ascx_resx" />
        <Compile Remove="Resources\*.cs" />
    </ItemGroup>

</Project>


Terry Aney

unread,
Jul 12, 2024, 2:30:55 PM (10 days ago) Jul 12
to Excel-DNA
Well, you see my screen shot above, so I'm not crazy :)  I was making new addin and progressively adding stuff, until I thought I had enough.  Then just tried the 'real' addin again and it worked (and .NET 6 still not installed).  No idea, but will let you know if it comes up again.

Govert van Drimmelen

unread,
Jul 12, 2024, 2:33:31 PM (10 days ago) Jul 12
to exce...@googlegroups.com

Maybe you were loading an old version of the add-in somehow.

 

Excel sometimes copies an add that is installed into another directory, then things can get confused.

 

-Govert

My project file looks like this and I've only had users install .NET 7.  I didn't want to have to have them install 6 and 7 but maybe required?

 

Output from user box for .NET info that received error:

 

Thanks in advance.

 

Terry

--
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/addd253f-f9c9-4eda-9f40-6c398e11980an%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages