Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ILSpy generate wrong .resx file for .NET Core #3001

Closed
CreateAndInject opened this issue Jun 8, 2023 · 6 comments
Closed

ILSpy generate wrong .resx file for .NET Core #3001

CreateAndInject opened this issue Jun 8, 2023 · 6 comments
Assignees
Labels
Bug Decompiler The decompiler engine itself ResX

Comments

@CreateAndInject
Copy link
Contributor

ResourceTest.zip

Original .resx in VS :
image

Saved project in VS :
image

@CreateAndInject CreateAndInject added Bug Decompiler The decompiler engine itself labels Jun 8, 2023
@siegfriedpammer siegfriedpammer self-assigned this Jun 19, 2023
@CreateAndInject
Copy link
Contributor Author

CreateAndInject commented Jun 22, 2023

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

@christophwille
Copy link
Member

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

@siegfriedpammer
Copy link
Member

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!

@CreateAndInject
Copy link
Contributor Author

ResTest.zip

@ElektroKill
Copy link
Contributor

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

@CreateAndInject
Copy link
Contributor Author

A year has passed, any news?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Decompiler The decompiler engine itself ResX
Projects
None yet
Development

No branches or pull requests

4 participants