Click here to Skip to main content
13,794,291 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: new edition down Pin
yjh198212-Sep-04 15:56
memberyjh198212-Sep-04 15:56 
GeneralRe: new edition down Pin
G A McHale14-Sep-04 21:22
memberG A McHale14-Sep-04 21:22 
GeneralRe: new edition down Pin
pblais30-Apr-07 11:24
memberpblais30-Apr-07 11:24 
GeneralSymbol Issue Pin
BRG8-Sep-04 1:52
memberBRG8-Sep-04 1:52 
GeneralRe: Symbol Issue Pin
s r8-Sep-04 10:48
members r8-Sep-04 10:48 
GeneralRe: Symbol Issue Pin
BRG8-Sep-04 13:46
memberBRG8-Sep-04 13:46 
Generalmemory leak Pin
InagakiM15-Aug-04 0:28
memberInagakiM15-Aug-04 0:28 
GeneralRe: memory leak Pin
s r15-Aug-04 5:48
members r15-Aug-04 5:48 
Generalneed help Pin
rezaimar14-Aug-04 22:36
memberrezaimar14-Aug-04 22:36 
General&amp;#50556;&amp;#46041;~ &amp;#48372;&amp;#49480;... Pin
김혜진2-Jul-04 23:58
member김혜진2-Jul-04 23:58 
General&amp;#50556;&amp;#54620;&amp;#47924;&amp;#48708;~ &amp;#48372;&amp;#49464;&amp;#50684;... Pin
정혜미1-Jul-04 10:43
suss정혜미1-Jul-04 10:43 
GeneralAdditional Include Paths Pin
gthorne28-Jun-04 13:09
membergthorne28-Jun-04 13:09 
GeneralRe: Additional Include Paths Pin
Stephane Rodriguez.28-Jun-04 21:48
memberStephane Rodriguez.28-Jun-04 21:48 
GeneralRe: Additional Include Paths Pin
gthorne29-Jun-04 3:33
membergthorne29-Jun-04 3:33 
GeneralCompile Fails with VC7.1 Pin
BRG22-Jun-04 13:41
memberBRG22-Jun-04 13:41 
GeneralRe: Compile Fails with VC7.1 Pin
gthorne25-Jun-04 2:05
membergthorne25-Jun-04 2:05 
GeneralRe: Compile Fails with VC7.1 Pin
Stephane Rodriguez.25-Jun-04 3:13
memberStephane Rodriguez.25-Jun-04 3:13 
GeneralRe: Compile Fails with VC7.1 Pin
gthorne28-Jun-04 13:03
membergthorne28-Jun-04 13:03 
GeneralRe: Compile Fails with VC7.1 Pin
BRG1-Jul-04 10:13
memberBRG1-Jul-04 10:13 
General&amp;#50556;&amp;#54620;&amp;#44144;~ &amp;#51600;&amp;#44048; &amp;#54616;&amp;#49464;&amp;#50836;. Pin
성혜리20-Jun-04 22:55
suss성혜리20-Jun-04 22:55 
General&amp;#50504;&amp;#45397;&amp;#54616;&amp;#49464;&amp;#50836;. Pin
복돌이15-Jun-04 1:52
suss복돌이15-Jun-04 1:52 
General&amp;#50504;&amp;#45397;&amp;#54616;&amp;#49464;&amp;#50836;. Pin
복순이12-Jun-04 9:08
suss복순이12-Jun-04 9:08 
GeneralRe: &amp;#50504;&amp;#45397;&amp;#54616;&amp;#49464;&amp;#50836;. Pin
Stephane Rodriguez.13-Jun-04 6:00
memberStephane Rodriguez.13-Jun-04 6:00 
GeneralVCPROJ to dsp Pin
shreyash7-Jun-04 20:18
membershreyash7-Jun-04 20:18 
GeneralRe: VCPROJ to dsp Pin
Stephane Rodriguez.8-Jun-04 5:00
memberStephane Rodriguez.8-Jun-04 5:00 

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.181207.3 | Last Updated 23 Oct 2003
Article Copyright 2002 by Stephane Rodriguez.
Everything else Copyright © CodeProject, 1999-2018
Layout: fixed | fluid