Paul
Paul

Reputation: 2564

Creating Visual Studio Solution Files Automatically

I have several Visual Studio .vcproj files which are auto generated, I would to automate the process of creation a solution file which includes all those .vcproj files.

Are there any command line tools which I can use the automate this as part of our build process?

P.S. It is possible to write some code to handle the necessary processing to handle this. However I am hoping for a MS provided commmand line tool which can handle various version of Visual Studio for now and the near future.

Upvotes: 1

Views: 2485

Answers (1)

Vishal Kotcherlakota
Vishal Kotcherlakota

Reputation: 1154

Visual Studio does have tools for generating GUIDs. If you reverse engineer .sln and .vcproj files using a text editor, you'll know enough to put together a script that can write a solution file.

From this link, you get some clues about the project type GUID:

The first GUID listed for each project is the type of project. For instance, a VB.NET project (vbproj) has this GUID: {F184B08F-C81C-45f6-A57F-5ABD9991F28F}. You can find all the GUIDs that Visual Studio uses in the registry under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\7.1\Projects\

The second GUID identifies the individual project. It corresponds to the GUID value found in the project listed in the solution file.

I'm about to give this a shot. Like someone said in the comments, this is a bit of a niche problem, so you may need to roll your own.

Upvotes: 1

Related Questions