KEMBAR78
Fix exception when writing resx files without adding any resources by jwfx · Pull Request #3418 · icsharpcode/ILSpy · GitHub
Skip to content

Conversation

jwfx
Copy link
Contributor

@jwfx jwfx commented Mar 4, 2025

Problem

Version 9.0.0.7889 throws a NullReferenceException when trying to write a resx file without calling AddResource() due to the uninitialized writer.

Solution

Initialize the writer during Generate, in case it was not initialized yet.

@siegfriedpammer siegfriedpammer merged commit bada92e into icsharpcode:master Mar 8, 2025
5 checks passed
@siegfriedpammer
Copy link
Member

Thank you very much!

@jwfx
Copy link
Contributor Author

jwfx commented Mar 8, 2025

Thank you very much!

Thanks for the quick reaction time on review and merge, much appreciated. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants