Add generated files to inspect
Answered
Hello. I have a files, which creates in 'obj/Debug'. And project compiles, but code inspector does not see them. It does not search in them and does not refer to classes generated in them. I try to add them explicitly in project but it didn't help me. So, what to do? VS works fine with this.
So, I saw menu for excluding files from inspection, but how to add them?
Please sign in to leave a comment.
Nobody knows?
Hello!
Debug files are treated as generated code and therefore are excluded from code style by default. You can remove this file type from the default list in settings: File | Settings | Editor | Inspection Settings | Generated Code. After that, you'll be able to run code reformat and cleanup on it.
Hope this helps!
Hello Alexandra, thank you for answer.
I already tried to remove *.g.cs from list of generated files, but it didn't help me.
Even search doesn't try to look in 'obj/Debug' folder, and if I try to open this files in Rider, they marked as yellow on the top of window panel. If I move files to another dir everything is alright. So, I think it should be an option to see the files inside temp directories, but not to include them to project explicitly.
Unfortunately, only files included in a project could be analyzed.
So, you should add your generated files to index and then in a project.
Best Regards,
Alexandra
Thank you Alexandra, this thing solved my problem, unfortunately it adds files to csproj explicitly, but it works.
Here is some issues connected with it:
https://youtrack.jetbrains.com/issue/RIDER-28557
So, thanks for help.