Open papashep opened 3 years ago
Thanks for reporting the issue and providing a code sample. I am unable to reproduce the issue (CodeMaid does not try to clean those files).
By default those files won't be recognized/open by CodeMaid. There is a configuration option that can be turned on to override that behavior which is intended for .txt and README files. Can you take a look at CodeMaid->Options->Cleaning->File Types and see if "Everything else" is selected?
Even with this selected I did not see the error message you saw, but it will cause CodeMaid to open those files during the cleanup process. I'm curious if just opening those files is causing that substitution to happen with or without CodeMaid.
If you open those image files in the editor without invoking CodeMaid do you see the same error message?
Environment
Description
I am fairly new to Visual Studio, CodeMaid and C#. The project I am using is from a Udemy Training Course and is not designed for production. The App.config is setup for encoding utf-8.
When I select the 'Cleanup all code' option of CodeMaid, when it reaches the image files in the Project References and my customer references I get the same error for each image file:
File Load
Some bytes have been replaced with Unicode substitutions character while loading file the file path followed by with Unicode(UTF-8) encoding. Saving the file will not preserve the original file contents.
This corrupts all .png and .jpg files in the References.
A rebuild of the project gives thousands of invalid token errors on the image files.
To recreate:
I do not understand why the Cleanup all code is touching image files repos.zip