ILSpy icon indicating copy to clipboard operation
ILSpy copied to clipboard

ILSpy generate wrong .resx file for .NET Core

Open CreateAndInject opened this issue 1 year ago • 6 comments

ResourceTest.zip

Original .resx in VS : image

Saved project in VS : image

CreateAndInject avatar Jun 08 '23 23:06 CreateAndInject

@dgrunwald @siegfriedpammer Branch resx-fix/Refactor ResXResourceWriter is merged, is it finished? But it still doesn't fix this issue

CreateAndInject avatar Jun 22 '23 14:06 CreateAndInject

That issue was not fixed by #3016 as far as I remember.

christophwille avatar Jun 22 '23 14:06 christophwille

Can you share the project you used to create this? The data stored in the resources stream does not resemble anything that looks like an icon. Thanks!

siegfriedpammer avatar Jun 25 '23 10:06 siegfriedpammer

Can you share the project you used to create this? The data stored in the resources stream does not resemble anything that looks like an icon. Thanks!

The reason why ILSpy fails to decode this resource properly is that the underlying ResourceReader class is different. The file uses a different variation of ResourceReader which uses a slightly different format for serialized objects. You can take a look at the different behavior here: https://github.com/dotnet/dotnet/blob/95703b57cf3dfaa79f054d277551a809d4f7696a/src/runtime/src/libraries/System.Resources.Extensions/src/System/Resources/Extensions/DeserializingResourceReader.cs#L108

ElektroKill avatar Jun 25 '23 19:06 ElektroKill

A year has passed, any news?

CreateAndInject avatar Jul 31 '24 15:07 CreateAndInject