65.9K
CodeProject is changing. Read more.
Home

Preventing Visual Studio from removing "using System"

Dec 1, 2010

CPOL
viewsIcon

10027

Shave all you create with Occam's Razor.

Here is the best alternative:

  • Critically look at your project's references and remove everything you do not use as soon as possible;
  • Always use VS's Organize Usings -> Remove Unused Usings as soon as possible;
  • Never be afraid if some using clause you planned to use has gone; try to avoid adding references too soon or "in advance", because later you may change your mind; keeping dependencies to the absolute minimum and adding them only as needed all the time is much easier than removing redundant dependencies later;
  • Remember: System is no different from any other;
  • Never forget to shave all you create with Occam's Razor! See also: .