Excel-DNA / Excel-DNA/ExcelDna

Why packed xll is smaller than dll with `PublishSingleFile`

Open
#798 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
1.5k
Forks
292
Avg merge
20d 12h
Merged PRs (30d)
1

Description

Here is my output dir:

```
Mode LastWriteTime Length Name
---- ------------- ------ ----
d----- 2025/9/19 15:27 publish
-a---- 2025/9/19 15:27 311 AmWPSAddin.dna
-a---- 2025/9/19 15:27 733184 AmWPSAddin.xll
-a---- 2025/9/19 15:27 311 AmWPSAddin64.dna
-a---- 2025/9/19 15:27 658944 AmWPSAddin64.xll <------ Much smaller
-a---- 2025/9/19 15:27 2502656 AmWPSAddinXll.dll <------- Much bigger
-a---- 2025/9/19 15:27 441256 AmWPSAddinXll.pdb
-a---- 2024/5/21 15:07 26112 GraphQL.Client.Abstractions.dll
-a---- 2024/5/21 15:07 19456 GraphQL.Client.Abstractions.Websocket.dll
-a---- 2024/5/21 15:07 82432 GraphQL.Client.dll
-a---- 2024/5/21 15:07 22016 GraphQL.Client.Serializer.Newtonsoft.dll
-a---- 2024/5/21 15:06 24576 GraphQL.Primitives.dll
-a---- 2025/9/16 16:04 721320 Newtonsoft.Json.dll
-a---- 2025/5/19 5:22 164864 Serilog.dll
-a---- 2025/4/28 8:38 38912 Serilog.Sinks.File.dll
-a---- 2020/2/19 18:05 20856 System.Buffers.dll
-a---- 2024/3/20 3:38 189104 System.Diagnostics.DiagnosticSource.dll
-a---- 2022/5/8 11:31 142240 System.Memory.dll
-a---- 2018/10/5 10:36 72192 System.Net.WebSockets.Client.Managed.dll
-a---- 2018/5/15 21:29 115856 System.Numerics.Vectors.dll
-a---- 2023/5/19 13:42 1358928 System.Reactive.dll
-a---- 2021/10/23 7:40 18024 System.Runtime.CompilerServices.Unsafe.dll
-a---- 2023/10/31 23:09 74000 System.Threading.Channels.dll
-a---- 2020/2/19 18:05 25984 System.Threading.Tasks.Extensions.dll
```

I tried to use dotnet `PublishSingleFile` feature to contains all depends lib in one dll and than pack it into xll. But I found that it seems compiled in incorrect order

1. generate small dll
2. exceldna pack a small xll
3. dotnet generate a big dll

Here is my project file:

```


net472
enable
true
true
false
10.0


AmWPSAddin













```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.