0

I am facing a problem in which there are numerous projects in .net , all saved to a particular location, most of which are just the default ones which are generated by the wizards.

There are projects which are just having the default structure.

I am thinking about reading the XML from the project files to know which files/references are present in the solution.

But, how to know if the noob has made a default project.

Do I need to use a .Net parser for the code file?

For Example, In a c# default project there are some standard assemblies referenced, and a default .cs file created with a standard function.

Biswanath Chowdhury
  • 257
  • 1
  • 3
  • 15
  • 1
    How do you determine the difference between a default project and one created by a wizard? As far as I know, the project files follow the same schema. – Oded Aug 29 '12 at 13:46
  • possible duplicate of [Library for parsing Visual Studio Solution files?](http://stackoverflow.com/questions/707107/library-for-parsing-visual-studio-solution-files) – jrummell Aug 29 '12 at 13:49
  • 1
    Well - the structure of a project isn't stored in a solution file anyway (which is also *text*, not XML) - I think you need to parse the XML of the project file - for which you could simply use Linq to XML – Andras Zoltan Aug 29 '12 at 13:51
  • @Oded : Yup, the schema is same. But how can we tell that the project is doing some actual work or just displaying the default Window Form. – Biswanath Chowdhury Aug 29 '12 at 13:52
  • @AndrasZoltan : thnx for pointing it out. – Biswanath Chowdhury Aug 29 '12 at 13:54

2 Answers2

1

The solution file isn't xml, but there are parsers look at this topic:

Parsing Visual Studio Solution files

Community
  • 1
  • 1
Erwin
  • 4,757
  • 3
  • 31
  • 41
1

Solution files are text based rather than XML. There is information on their format here Solution (.sln) File.

Most project files (e.g. .csproj files) are in the MSBuild file format which is XML based. A standard XML parser can be used to read these files and the file format is documented here MSBuild Reference.

Justin
  • 84,773
  • 49
  • 224
  • 367