Versioning

198 views
Skip to first unread message

Albrecht Hilmes

unread,
Aug 12, 2025, 4:46:42 AMAug 12
to Excel-DNA
VersionInfo.pngWhat is the best practice for versioning?
Can I add the version number to *.xll to be displayed in the file properties (see first picture)?
The *.dll file has a version number in the file properties - which is nomally packed (second picture).

Herzliche Grüße
Albrecht

Govert van Drimmelen

unread,
Aug 13, 2025, 6:06:02 AMAug 13
to Excel-DNA
Hi Albrecht,

The .xll files do have an embeded version resource. However, in Windows Explorer the version information for the .xll file will not be shown by default. You can rename the .xll file to .dll and the check the properties to see the version information.

This will normally just be the pre-built Excel-DNA version information.
You can then have the version information from your .dll project copied to the .xll output by adding this project property to your .csproj file:

    <PropertyGroup>
        <ExcelAddInUseVersionAsOutputVersion>true<ExcelAddInUseVersionAsOutputVersion>
    </PropertyGroup>


-Govert

Mariano Diaz Fernandez

unread,
Oct 29, 2025, 5:06:08 AM (yesterday) Oct 29
to Excel-DNA
Hi,
The embeded version resource is not working for me, and I close to desperation. Since it's not working in my c# project, I took one of DNA samples (AddinReloader) and put in .csproj and .dna files the necessary properties:

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

<PropertyGroup>
<TargetFrameworks>net472;net8.0-windows8.0</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="ExcelDna.Addin" Version="*-*" />
</ItemGroup>

   <!-- Assembly version -->
   <PropertyGroup>
      <ExcelAddInUseVersionAsOutputVersion>true</ExcelAddInUseVersionAsOutputVersion>
     
      <Version>1.0</Version>

      <AssemblyName>AddInReloader</AssemblyName>
      <AssemblyTitle>Test AddInReloader</AssemblyTitle>
      <AssemblyDescription>My AddInReloader description</AssemblyDescription>
      <Company>Home sweet home</Company>
      <Product>ExcelAddIns</Product>
      <EnableDynamicLoading>true</EnableDynamicLoading>
      <ProduceReferenceAssembly>false</ProduceReferenceAssembly>
   </PropertyGroup>

   <!-- Excel-Dna -->
   <PropertyGroup>
      <ExcelDnaPack>true</ExcelDnaPack>
      <ExcelDnaCreate64BitAddIn>true</ExcelDnaCreate64BitAddIn>
      <ExcelDnaCreate32BitAddIn>false</ExcelDnaCreate32BitAddIn>
   </PropertyGroup>

</Project>

AddInReloader-AddIn.dna
<?xml version="1.0" encoding="utf-8"?>
<DnaLibrary UseVersionAsOutputVersion="true">
   <ExternalLibrary Path="AddInReloader.dll" LoadFromBytes="true" Pack="true"/>
</DnaLibrary>

AddInReloader-AddIn64-packed.xll
AddInReloader-AddIn64-packed.png

What am i doing wrong?

Thanks a thillion.

Govert van Drimmelen

unread,
Oct 29, 2025, 5:17:09 AM (yesterday) Oct 29
to exce...@googlegroups.com

Delete the .dna file you have in your project folder and rebuild everything.

The ExcelDna build task will then create a .dna file in the output directory with the right attributes set.

 

The problem is that the attribute you have in the project’s .dna file is not in the right place.

When you have a project .dna file, then the build does not create a new one, so the project properties you set are not used.

 

-Govert

 

What am i doing wrong?

 

Thanks a thillion.

 

El miércoles, 13 de agosto de 2025 a las 12:06:02 UTC+2, Govert van Drimmelen escribió:

Hi Albrecht,


The .xll files do have an embeded version resource. However, in Windows Explorer the version information for the .xll file will not be shown by default. You can rename the .xll file to .dll and the check the properties to see the version information.


This will normally just be the pre-built Excel-DNA version information.
You can then have the version information from your .dll project copied to the .xll output by adding this project property to your .csproj file:

    <PropertyGroup>
        <ExcelAddInUseVersionAsOutputVersion>true<ExcelAddInUseVersionAsOutputVersion>
    </PropertyGroup>

 

-Govert

 

On Tuesday, August 12, 2025 at 10:46:42AM UTC+2 a...@schleich.com wrote:

What is the best practice for versioning?

Can I add the version number to *.xll to be displayed in the file properties (see first picture)?

The *.dll file has a version number in the file properties - which is nomally packed (second picture).

 

Herzliche Grüße

Albrecht

--
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 visit https://groups.google.com/d/msgid/exceldna/191c06d4-7683-4013-98f2-5162f3a6c051n%40googlegroups.com.

image001.png

Mariano Diaz Fernandez

unread,
Oct 29, 2025, 6:47:26 AM (yesterday) Oct 29
to exce...@googlegroups.com
Ok. That worked fine.

However, I need to customize the ribbon, and I understand that this should be done through .dna file. But, if I have a .dna file in the project folder, the .xll versioning won't work.
Is it possible achieve both, customize ribbon and .xll versioning?

Again, thank you very much.

Govert van Drimmelen

unread,
Oct 29, 2025, 6:58:40 AM (yesterday) Oct 29
to exce...@googlegroups.com

I suggest you put the ribbon customization in your C# code by returning the xml from a Ribbon class’s GetCustomUI override  – either just put the xml string in the code, or store it as a file in a C# ‘embedded resource’ and fetch from the resource at runtime with Assembly.GetManifestResourceStream.

image001.png
Reply all
Reply to author
Forward
0 new messages