I'm trying to code a couple of tools to manage Visual Studio's projects. The reason why I need an external program for that is that 1) I use VS Express, so I have no macro support, and 2) it may be useful to perform similar operations on VS and non-VS projects.

The first thing I though about when I needed to model a VS project was to use c#'s XML serialization to load and save the project. But the vcproj file (C++ project file) has configurations that are defined like this:
Code:
		<Configuration
			Name="Debug|Win32"
			OutputDirectory="..\$(ConfigurationName)"
			IntermediateDirectory="$(ConfigurationName)"
			ConfigurationType="4"
			CharacterSet="2"
			>
			<Tool
				Name="VCPreBuildEventTool"
			/>
			<Tool
				Name="VCCustomBuildTool"
			/>
			<Tool
				Name="VCXMLDataGeneratorTool"
			/>
			<Tool
				Name="VCWebServiceProxyGeneratorTool"
			/>
			<Tool
				Name="VCMIDLTool"
			/>
			...
If I associate the "Tool" XmlElement to a certain class, I am not able to differentiate between the different type of tools. What I would need is to differentiate the classes the element is serialized/deserialized to/from based on the element's "Name" attribute, but I haven't found anything about how to do this.

Can anybody please give suggestions? Thanks.