gluck / il-repack

Open-source alternative to ILMerge
Apache License 2.0
1.16k stars 214 forks source link

Replaced BinarySerializer with DataContractSerializer to avoid NotSupportException on .NET 8.0 #328

Closed hugener closed 8 months ago

hugener commented 9 months ago

Issue: https://github.com/gluck/il-repack/issues/327

KirillOsenkov commented 8 months ago

Thank you, your PR had conflicts, so it was easier to manually reapply the changes.

Fixed in https://github.com/gluck/il-repack/commit/f0bf88e819ab2b2356a02ffe00ecc0522a4a37c7

KirillOsenkov commented 8 months ago

Unfortunately I realized that changing the serialization format will break compatibility with the existing bytes in the wild.

See for example this regression: https://github.com/gluck/il-repack/issues/283#issuecomment-1872477883

I wrote a custom serializer that preserves the exact byte format used by BinaryFormatter, the change is here: https://github.com/gluck/il-repack/commit/01b54ff113123da84d8283df0b70175549e926b0

Thanks!