Click here to Skip to main content
14,265,784 members

VC++7 to VC++6 project converter

Rate this:
4.92 (204 votes)
Please Sign up or sign in to vote.
4.92 (204 votes)
22 Oct 2003
This tool automatically converts Visual C++ 7.0 projects back to Visual C++ 6.0 projects.

What is this ?

This tool automatically converts Visual C++ 7.0 projects back to Visual C++ 6.0 projects. In other words, .sln/.vcproj file pairs are translated to .dsw/.dsp file pairs.

Important note, there is no loss during the conversion: source code is left unchanged; only .dsw/.dsp are created (or overwritten).


First of all because MS doesn't provide it. It's easy to become cynical against MS when you feel how bad it is to sell developer tools without all the necessary "moulinettes" (converters in ugly English) to go backward.

Without this tool, you end up recreating your projects from scratch: a total waste of time, and prone to errors. Actually there are several scenarios where this tool is useful:

  • Someone gives you a VC++ 7 project, and you only have VC++ 6 installed.
  • You have upgraded your project(s) from VC++ 6 to VC++ 7, and you have both .dsw/.dsp and .sln/.vcproj files on your local system drive, but you are willing to keep those files synchronized so any time you need to open the project, you need not bother the VC++ version you work with.
  • Provide both versions of projects (for instance when you share code on CodeProject), so your audience does not need to bother with knowing which devtool is required.

How to use it

The tool is a command line of the form:

prjconverter <solutionname (full filepath)>[.sln]

For instance,

prjconverter c:\tmp\betterxml\betterxml.sln

For info, type prjconverter.exe alone in the console.

What is converted

A few steps to let you know how the work gets done. The .sln solution file is opened and translated to the .dsw file format, along with all project declarations, dependencies, and source control tags.

Then all .vcproj project files are translated to .dsp files. I use MSXML to parse the .vcproj file format, and build the meta-model out of it. Then what's left to do is serialize all those XML thingies into the standard .dsp symbol lines.

Of course we care about project configurations (debug, release, ...), and custom file configuration settings.

Technical details

In the code provided, slnprocess.cpp does the .sln =>.dsw conversion. vcprojprocess.cpp does the .vcproj => .dsp conversion. And vcprojconfiguration.cpp holds the project meta-model (all project setting tabs). In VC++ 7, the meta-model is now programmable. Let's check out this link. In fact, vcprojconfiguration.cpp reflects exactly this meta-model (as if it was internal MS code).


This tool has been extensively tested before being published (MFC/COM/ATL/console apps, makefiles, ...). Though I am willing to know if there is anything I can do in order to improve it, let me clearly say that it's not my fault if your project is corrupted by this tool.

Update history

  • Sept 27 - code complete
  • Oct 2 - now it is possible to convert .vcproj files alone (no need of a root .sln file): just type the .vcproj full path in the command line.
  • Oct 30 - improvements based on user feedback: added missing default link libraries, expanded certain macro variables such like $(OutDir) and $(IntDir), replaced or removed certain macro variables not supported by VC6 such like $(NoInherit), added /GX (exception handling enabled).
  • Nov 13 - bug fixes: filenames with spaces, MFC extension DLL support, custom precompiled header setting, project setting inheritance.


This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


About the Author

Addicted to reverse engineering. At work, I am developing business intelligence software in a team of smart people (independent software vendor).

Need a fast Excel generation component? Try xlsgen.

Comments and Discussions

GeneralRe: October 23, 2003 update Pin
Stephane Rodriguez.5-Nov-03 19:14
memberStephane Rodriguez.5-Nov-03 19:14 
GeneralRe: October 23, 2003 update Pin
John M. Drescher24-Nov-03 16:52
memberJohn M. Drescher24-Nov-03 16:52 
GeneralA question on XML parser Pin
newWhiz22-Sep-03 9:03
membernewWhiz22-Sep-03 9:03 
GeneralRe: A question on XML parser Pin
Stephane Rodriguez.27-Sep-03 0:40
memberStephane Rodriguez.27-Sep-03 0:40 
newWhiz wrote:
A friend of mine told me that the Visual Studio IDE uses .NET Object model to read/write/update VCPROJ files

While it's true that this folder <vc7installdir>\Common7\IDE\PublicAssemblies has assemblies that allows one to drive vcproj files, there is no API method allowing to be able to save the current vcproj file into an external format.

And there is no API method allowing to export the vcproj file into the vc++6 dsp file format. Quite the contrary, it is part of the Microsoft marketing to prevent this from happening.

newWhiz wrote:
One reason may be that the XML thing is slow.

There is a strong misconception regarding XML parsers. XML in itself is just like any binary file format. What makes is slow is the perceived parsing time especially if you are trying to load huge XML files. At this point, 99% of people will say that XML is very good for declaring configurations and stuff like this, but XML is strictly inappropriate when it comes to storing actual data (like SQL tables).
So I personally use XML for what it is good for. And that's pretty much all about it. Microsoft is right to use XML in VS7 to describe project workspaces since 90% of them will end up in only a few kilobytes.

newWhiz wrote:
Any reason why you used XML parser to load/read vcproj files?

This one got me wondering. Vcproj files are xml-based file formats, so do you think I can parse a vcproj file using a GIF reader ?

newWhiz wrote:
But I started to think, if I use the XML parser to read and update all my 100 vcproj files, my build process might take forever

I think my converter is quite fast since it does on-the-fly conversion, but I'll let you decide if it is fast enough for you.

I don't see any problem in using it in the workflow you describe. By the way, a lot (if not all) of software companies have custom and proprietary automated build processes as well, so I believe your interesting question deserves better than just a comment here. I would strongly suggest to post it in a few forums.

Better ways to solve your problem? Quite honestly, I am wondering whether doing the opposite would be better, that is : work with VC++6 dsp files, and silently upgrade to VS7 project files in the automated build. It depends on what really matters more between the VC++6 target and the VC++7 target.

  RSS feed
GeneralInverse conversion (VS6 to VS2002) Pin
FabriceExp20-Aug-03 22:02
memberFabriceExp20-Aug-03 22:02 
GeneralRe: Inverse conversion (VS6 to VS2002) Pin
Stephane Rodriguez.20-Aug-03 22:32
memberStephane Rodriguez.20-Aug-03 22:32 
GeneralRe: Inverse conversion (VS6 to VS2002) Pin
FabriceExp20-Aug-03 22:48
memberFabriceExp20-Aug-03 22:48 
GeneralRe: Inverse conversion (VS6 to VS2002) Pin
Stephane Rodriguez.20-Aug-03 23:07
memberStephane Rodriguez.20-Aug-03 23:07 
GeneralVisual .Net2003 Pin
FabriceExp12-Aug-03 4:51
memberFabriceExp12-Aug-03 4:51 
GeneralRe: Visual .Net2003 Pin
Stephane Rodriguez.12-Aug-03 5:01
memberStephane Rodriguez.12-Aug-03 5:01 
GeneralRe: Visual .Net2003 Pin
FabriceExp12-Aug-03 23:59
memberFabriceExp12-Aug-03 23:59 
GeneralRe: Visual .Net2003 Pin
Stephane Rodriguez.13-Aug-03 1:16
memberStephane Rodriguez.13-Aug-03 1:16 
GeneralGDI Plus alternative in VC 6 Pin
Rizi28-Jul-03 21:55
memberRizi28-Jul-03 21:55 
GeneralRe: GDI Plus alternative in VC 6 Pin
Stephane Rodriguez.28-Jul-03 22:03
memberStephane Rodriguez.28-Jul-03 22:03 
GeneralFree C#, VB.NET, and VC++ solutions/project converter Pin
Stoyan Damov25-Jul-03 22:17
memberStoyan Damov25-Jul-03 22:17 
GeneralGreat but missed RTTI Pin
TomM25-Jun-03 14:36
memberTomM25-Jun-03 14:36 
GeneralRe: Great but missed RTTI Pin
Stephane Rodriguez.26-Jun-03 4:18
memberStephane Rodriguez.26-Jun-03 4:18 
GeneralRe: Great but missed RTTI Pin
TomM26-Jun-03 4:28
memberTomM26-Jun-03 4:28 
GeneralC#.NET 1.1 to 1.0 Pin
Kant25-Jun-03 3:45
memberKant25-Jun-03 3:45 
GeneralRe: C#.NET 1.1 to 1.0 Pin
Derek Lakin25-Jun-03 3:52
memberDerek Lakin25-Jun-03 3:52 
GeneralRe: C#.NET 1.1 to 1.0 Pin
Kant25-Jun-03 3:58
memberKant25-Jun-03 3:58 
GeneralRe: C#.NET 1.1 to 1.0 Pin
Stephane Rodriguez.25-Jun-03 4:41
memberStephane Rodriguez.25-Jun-03 4:41 
GeneralConsole app Pin
bartlomiej19-Jun-03 1:03
memberbartlomiej19-Jun-03 1:03 
GeneralRe: Console app Pin
Stephane Rodriguez.19-Jun-03 1:12
memberStephane Rodriguez.19-Jun-03 1:12 
GeneralConsole app Pin
bartlomiej19-Jun-03 1:03
memberbartlomiej19-Jun-03 1:03 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Posted 26 Sep 2002


246 bookmarked