Click here to Skip to main content
13,294,435 members (58,551 online)
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

QuestionNo .dsp files produced Pin
Member 114312205-Feb-15 18:17
memberMember 114312205-Feb-15 18:17 
GeneralMy vote of 5 Pin
Ecurve12-Mar-12 0:12
memberEcurve12-Mar-12 0:12 
Generalthank you x100 Pin
Member 785965820-Apr-11 12:12
memberMember 785965820-Apr-11 12:12 
I still *strongly* prefer to use vs6 as my C++ code editor, because lots of little things about versions 7 and above annoy me to no end. I tried living with the newer versions for a long time now, and I just cant get over some of the UI changes they made (that are unchangeable, as far as I can tell). With all my work being for projects made for the newer Visual Studios, I was beginning to think I'd never be able to use VS6 again...but this program breathed new life into VS6 for me! I can't thank you enough!
QuestionTrouble with configuration file Pin
Clement Ehrenreich27-Jan-10 15:11
memberClement Ehrenreich27-Jan-10 15:11 
GeneralSource Updates Pin
Hibn22-Apr-09 5:27
memberHibn22-Apr-09 5:27 
GeneralRe: Source Updates Pin
Stephane Rodriguez.29-Apr-09 5:53
memberStephane Rodriguez.29-Apr-09 5:53 
GeneralRe: Source Updates Pin
sfenu28-Jun-09 13:08
membersfenu28-Jun-09 13:08 
GeneralRe: Source Updates Pin
Hibn19-Jul-09 17:14
memberHibn19-Jul-09 17:14 
GeneralRe: Source Updates Pin
sfenu20-Jul-09 1:36
membersfenu20-Jul-09 1:36 
GeneralRe: Source Updates Pin
t0trader26-Oct-16 3:17
membert0trader26-Oct-16 3:17 
GeneralThis one is really nice utility Pin
HansaP13-Feb-09 1:18
memberHansaP13-Feb-09 1:18 
Questionwhat about $(InputName) and $(ConfigurationName) project variables ? Pin
zain123417-Dec-08 9:10
memberzain123417-Dec-08 9:10 
GeneralThank you for the binary Pin
temp_trash12345-Nov-08 4:59
membertemp_trash12345-Nov-08 4:59 
JokeYou are god Pin
Member 103634522-Apr-08 3:01
memberMember 103634522-Apr-08 3:01 
GeneralThis one I've been waiting for!!! Pin
Sarath.9-Jan-08 18:48
member Sarath. 9-Jan-08 18:48 
QuestionHave you tried this with VS 2008?? Pin
JediScientist18-Nov-07 8:36
memberJediScientist18-Nov-07 8:36 
AnswerRe: Have you tried this with VS 2008?? Pin
keran9-Dec-08 5:36
memberkeran9-Dec-08 5:36 
GeneralLink Error- Kindly help! Pin
Priya_Sundar2-Oct-07 21:34
memberPriya_Sundar2-Oct-07 21:34 
Questionconvert .mak settings to .dsp .dws settings [modified] Pin
hackeronte de bugger26-Aug-07 6:44
memberhackeronte de bugger26-Aug-07 6:44 
Generaldoesnt work with just a .vcproj file Pin
pblais30-Apr-07 11:12
memberpblais30-Apr-07 11:12 
GeneralRe: doesnt work with just a .vcproj file Pin
MajorCode4-Sep-07 7:26
memberMajorCode4-Sep-07 7:26 
GeneralRe: doesnt work with just a .vcproj file Pin
MulleDK1315-Oct-07 6:49
memberMulleDK1315-Oct-07 6:49 
GeneralDoesn't work for larger projects Pin
phm3713-Mar-07 0:01
memberphm3713-Mar-07 0:01 
GeneralI get this error in all the cases Pin
shravankrshukla16-Feb-07 1:10
membershravankrshukla16-Feb-07 1:10 
GeneralExactly what I needed. Great tool, thanks a lot! Pin
wef iwefkgw wefwjhg wef3-Feb-07 5:46
memberwef iwefkgw wefwjhg wef3-Feb-07 5:46 
GeneralExcellent utility... Pin
ravisetti11-Dec-06 13:58
memberravisetti11-Dec-06 13:58 
Generalcompile error Pin
zoz11-Dec-06 12:30
memberzoz11-Dec-06 12:30 
GeneralRe: compile error Pin
Stephane Rodriguez.12-Dec-06 10:48
memberStephane Rodriguez.12-Dec-06 10:48 
Generalneed to convert manually $ProjectName Pin
ot_av29-Nov-06 1:24
memberot_av29-Nov-06 1:24 
Generalsmall bug Pin
incucuna17-Sep-06 22:11
memberincucuna17-Sep-06 22:11 
Generalerror compiling under VC++ 7 Pin
rb-x7-Aug-06 17:36
memberrb-x7-Aug-06 17:36 
GeneralRe: error compiling under VC++ 7 Pin
Stephane Rodriguez.17-Aug-06 20:50
memberStephane Rodriguez.17-Aug-06 20:50 
AnswerRe: error compiling under VC++ 7 Pin
cpetig30-Mar-07 6:30
membercpetig30-Mar-07 6:30 
GeneralFails to convert include paths with environment variables Pin
tomasth17-May-06 2:54
membertomasth17-May-06 2:54 
GeneralRe: Fails to convert include paths with environment variables Pin
Stephane Rodriguez.17-Aug-06 21:17
memberStephane Rodriguez.17-Aug-06 21:17 
GeneralIt would be good to have a VC++8 to VC++7 too... Pin
Jun Du26-Apr-06 7:03
memberJun Du26-Apr-06 7:03 
GeneralRe: It would be good to have a VC++8 to VC++7 too... [modified] Pin
Stephane Rodriguez.17-Aug-06 21:18
memberStephane Rodriguez.17-Aug-06 21:18 
GeneralRe: It would be good to have a VC++8 to VC++7 too... Pin
pipomolo11-Oct-06 4:09
memberpipomolo11-Oct-06 4:09 
QuestionSuper. Could it also generate vc7.x nmake file? Pin
l_d_allan21-Apr-06 3:49
memberl_d_allan21-Apr-06 3:49 
GeneralTerrific. But 'run-together' compiler flags generated. Pin
l_d_allan21-Apr-06 3:44
memberl_d_allan21-Apr-06 3:44 
GeneralRemarakable Work!!! Pin
vatic1-Feb-06 11:30
membervatic1-Feb-06 11:30 
Generalexcellent!!! thanks a lot Pin
fabrizio.carraro21-Jan-06 10:45
memberfabrizio.carraro21-Jan-06 10:45 
GeneralSome error msg in VC++ 6 Pin
jasonliang28-Dec-05 20:49
memberjasonliang28-Dec-05 20:49 
GeneralRe: Some error msg in VC++ 6 Pin
MrJOeM21-Nov-06 8:25
memberMrJOeM21-Nov-06 8:25 
GeneralWonderful job Pin
MRAAX23-Dec-05 22:53
memberMRAAX23-Dec-05 22:53 
Generalhelp ,wont detect the .sln Pin
dirk>uk24-Nov-05 11:52
memberdirk>uk24-Nov-05 11:52 
QuestionIE SaveAs MHTML Pin
pluplu20021-Nov-05 7:56
memberpluplu20021-Nov-05 7:56 
GeneralGenerate makefile from VC 6 Pin
Irvin Tan8-Nov-05 23:01
memberIrvin Tan8-Nov-05 23:01 
GeneralRe: Generate makefile from VC 6 Pin
Stephane Rodriguez.9-Nov-05 6:43
memberStephane Rodriguez.9-Nov-05 6:43 
GeneralExcellent but fails in one case Pin
Pierre Couderc8-Nov-05 22:19
memberPierre Couderc8-Nov-05 22:19 

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 | Terms of Use | Mobile
Web02 | 2.8.171207.1 | Last Updated 23 Oct 2003
Article Copyright 2002 by Stephane Rodriguez.
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid