Reputation: 24263
Does anyone know how I can stop Visual Studio 2005 adding references to the System.Data and System.XML assemblies every time I add a class to a c# project? It does not use any of them and I need to remove them everytime I notice.
Thanks.
Upvotes: 2
Views: 286
Reputation: 100258
That's because Class template contains such. To edit it, open:
C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\ItemTemplatesCache\CSharp\Code\1033\Class.zip
\Class.vstemplate
and remove unnecessary references.
To remove unnecessary namespaces, edit:
C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\ItemTemplatesCache\CSharp\Code\1033\Class.zip
\Class.cs
Upvotes: 4
Reputation: 13278
Wouldn't this just be a case of altering the .cs template in Visual Studio and deleting the using statements you don't require? See here for more info:
http://msdn.microsoft.com/en-us/library/ms185319(v=vs.80).aspx
Upvotes: 1
Reputation: 4409
You need to edit vstemplage file
I think this is the same topic here How do I edit the Visual Studio templates for new C# class/interface?
Upvotes: 0