I have some code that i need only to be run in a deployed environment (stage/test/production).
The code genereates some usings to other namespaces that appear at the top of the .cs file.
However, when i put this code inside my preprocessor directive #IF !DEBUG the usings at the top of the .cs file now claims
Using directive is unnecessary.
This feels dangerous. Since this is a multiple personnell project, i fear that someone is going to enter this file at some point and just auto-remove the usings since they're flagged as unnecessary.
My current solution is to just comment the code at the top of the file to not remove them.
So, how can i make my unnecessary usings directives non-unnecessary?