gluck / il-repack

Open-source alternative to ILMerge
Apache License 2.0
1.19k stars 217 forks source link

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

Closed hugener closed 11 months ago

hugener commented 1 year ago

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

KirillOsenkov commented 11 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 11 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!