Search code examples
c#visual-studio-2017

Invalid Resx file. Invalid character in the given encoding


Suddenly, I confronted an exception when I tried to build my solution, Before that my application was work fine. I don't think the problem in coding or in my solution but if the auto-updates of something in windows or another thing. and I got other error when I remove the .resx file, and like you see in the picture included here; some Form cannot access to it.. and some code converted to binary "&éàéçàé". -You will find here a picture described exception well.

[Exception][1]


[1]Error Image: https://i.sstatic.net/I8mPL.png


Solution

  • The issue because of an update to latest version May 12, 2020 -- Visual Studio 2017 version 15.9.23. so that caused a problem of encoding and a lot of issues like "some bytes have been replaced with the Unicode substitution" Exception. - Solution :
    -I uninstall the latest version and go back to my previous version of visual studio release of Dec 2019.
    -I used ILSpy to decompile and recover code lines converted to binary ("zé45&87£%%£./?") from a setup (or latest debug generated).