Click here to Skip to main content
13,801,281 members
Click here to Skip to main content
Add your own
alternative version


246 bookmarked
Posted 26 Sep 2002

VC++7 to VC++6 project converter

, 22 Oct 2003
Rate this:
Please Sign up or sign in to vote.
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.

You may also be interested in...

Comments and Discussions

GeneralRe: Excellent but fails in one case Pin
Stephane Rodriguez.9-Nov-05 6:50
memberStephane Rodriguez.9-Nov-05 6:50 
GeneralRe: Excellent but fails in one case Pin
Pierre Couderc9-Nov-05 20:07
memberPierre Couderc9-Nov-05 20:07 
GeneralExcelent! Pin
Gavriloaie Andrei23-Oct-05 12:24
memberGavriloaie Andrei23-Oct-05 12:24 
GeneralGood work! Pin
TedLadewski4-Oct-05 11:09
memberTedLadewski4-Oct-05 11:09 
GeneralDoesn't work Pin
afil654514-Sep-05 21:10
memberafil654514-Sep-05 21:10 
Hello Stephanie,

Maybe you coud help me. I ran the program and typed the full path of the sln file but nothing happens. (can the path contain spaces?)

The program outputs the help information. The same couple of lines as if I just typed "prjconverter" without the path into it. The vjproj file remains the same and no new files are added.

I also tried compiling the source code but I get the same error
GeneralRe: Doesn't work Pin
Stephane Rodriguez.19-Sep-05 3:31
memberStephane Rodriguez.19-Sep-05 3:31 
GeneralRe: Doesn't work Pin
MrJOeM21-Nov-06 8:27
memberMrJOeM21-Nov-06 8:27 
GeneralDoesn't work or compile Pin
afil654514-Sep-05 18:01
memberafil654514-Sep-05 18:01 
GeneralLack some dependencies Pin
zieQ26-Aug-05 2:23
memberzieQ26-Aug-05 2:23 
GeneralI Forgot Pin
26-Aug-05 2:30
suss26-Aug-05 2:30 
GeneralDoes it work if there's no &quot;.sln&quot; file. Pin
Johnnyfartpants10-Aug-05 5:45
memberJohnnyfartpants10-Aug-05 5:45 
GeneralRe: Does it work if there's no &quot;.sln&quot; file. Pin
Stephane Rodriguez.18-Aug-05 21:34
memberStephane Rodriguez.18-Aug-05 21:34 
GeneralRe: Does it work if there's no &quot;.sln&quot; file. Pin
Johnnyfartpants18-Aug-05 22:25
memberJohnnyfartpants18-Aug-05 22:25 
GeneralRe: Does it work if there's no &quot;.sln&quot; file. Pin
pblais30-Apr-07 11:19
memberpblais30-Apr-07 11:19 
GeneralGreat but how do I install it Pin
pl4gu328-Jul-05 8:38
memberpl4gu328-Jul-05 8:38 
GeneralRe: Great but how do I install it Pin
Stephane Rodriguez.18-Aug-05 21:35
memberStephane Rodriguez.18-Aug-05 21:35 
GeneralRe: Great but how do I install it Pin
Anonymous19-Aug-05 21:53
memberAnonymous19-Aug-05 21:53 
GeneralRe: Great but how do I install it Pin
jaypal31-Oct-06 0:25
memberjaypal31-Oct-06 0:25 
Generalmsxml2.h again Pin
Member 108697026-Jul-05 2:13
memberMember 108697026-Jul-05 2:13 
GeneralRe: msxml2.h again Pin
Stephane Rodriguez.18-Aug-05 21:38
memberStephane Rodriguez.18-Aug-05 21:38 
GeneralRe: msxml2.h again Pin
pblais30-Apr-07 11:00
memberpblais30-Apr-07 11:00 
GeneralRe: msxml2.h again Pin
wangerst14-May-07 23:45
memberwangerst14-May-07 23:45 
GeneralRe: msxml2.h again Pin
wangerst14-May-07 23:50
memberwangerst14-May-07 23:50 
GeneralRe: msxml2.h again Pin
pblais15-May-07 4:02
memberpblais15-May-07 4:02 
QuestionHow do I use/install this tool? Pin
kinginkvong4-Jul-05 10:12
memberkinginkvong4-Jul-05 10:12 

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.

Permalink | Advertise | Privacy | Cookies | Terms of Use | Mobile
Web01 | 2.8.181215.1 | Last Updated 23 Oct 2003
Article Copyright 2002 by Stephane Rodriguez.
Everything else Copyright © CodeProject, 1999-2018
Layout: fixed | fluid