I'm using Visual Studios Code Cleanup on Save to automatically clean my code when i save. It also removes unused namespaces. But now i noticed that it even removes namespaces when they are actually in use in preprocessor directives. What can i do to avoid it?
Code is here:
private void RegisterTracking()
{
#if DEBUG
IResourceFilePostProcessor processor = null;
#else
IResourceFilePostProcessor processor = new ResourceFilePostProcessor();
#endif
For<ITrackingResourceFileService>().Add(new TrackingResourceFileService(processor));
}
Actually i think this is a visual studio bug because it should not be seen as unused.