- NeuroLive.NET - http://blog.neurolive.net -
Remove System.Data and System.XML permanently (Visual Studio 2005)
Posted By bigmoshi On July 15, 2009 @ 12:49 am In IDE tweaks | No Comments
In VS2005, whenever a class is added to a project then references to System.dll, System.Data.dll, and System.XML.dll are added automatically. This can certainly be frustrating if you are trying to keep the set of unused references out of sight.
The solution I found was from http://blogs.msdn.com/ansonh/archive/2006/02/22/537414.aspx [1].
However, a simpler way would be to edit the ItemTemplatesCache instead. The .vstemplate file also contains the list of references to use when a new class is added to the project. In order to change this behavior, simply do this:
1 2 3 4 5 6 7 8 9 10 11 | <Reference> <Assembly>System</Assembly> <Reference> <!-- <Reference> <Assembly>System.Data</Assembly> </Reference> <Reference> <Assembly>System.Xml</Assembly> </Reference> --> |
1 2 3 4 5 6 7 8 9 10 | remove --> using System; remove --> using System.Collections.Generic; remove --> using System.Text; namespace $rootnamespace$ { class $safeitemrootname$ { } } |
When this is done, restart VS2005. The Add | Class… item template will no longer add a reference to System.Data.dll or System.Xml.dll to your project. Neither will the redundant headers show.
Article printed from NeuroLive.NET: http://blog.neurolive.net
URL to article: http://blog.neurolive.net/2009/07/remove-system-data-and-system-xml-permanently-vs2005/
URLs in this post:
[1] http://blogs.msdn.com/ansonh/archive/2006/02/22/537414.aspx: http://blogs.msdn.com/ansonh/archive/2006/02/22/537414.aspx
Click here to print.
Copyright © 2009 Neuro Live. All rights reserved.