Friday, September 10, 2010

VS2003 Platform Toolset, initial release

VS2010 offers a great possibility to use its modern environment for compiling older projects. Microsoft provided Platform Toolset for VS2008, support files for VS2005 can be found on the Internet, but, due to many internal problems, there's nothing that would work for VS2003. This project tries to change this...



You can find the first version here: download (rel1)


For installation, do the following:
  1. Copy v71 directory into C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Platforms\Win32\PlatformToolsets or the equivalent.
  2. Copy other files to your C:\Program Files\Microsoft Visual Studio .NET 2003\VC7\bin dir (or the equivalent).
  3. Run ConvertResponse_install.bat from the command line in the directory from the step 2.

To do the uninstall, do previous steps in reverse, but use ConvertResponse_uninstall.bat.


Use it like this:
  1. Load your VS2003 project into the VS2010 (it will be converted to .vcxproj).
  2. Change Project Properties\Configuration Properties\General\Platform Toolset to v71.
  3. Compile!
  4. If you'll encounter problems, most probably the problem is that VS2010 sets some property which VS2003 doesn't understand. For such cases, you might want to edit ConvertResponse.ini file which contains parameter replacement rules (with help present in the file itself).


Beware:
  1. Although the binaries should be the same as if generated on VS2003, VS2010 sets some options differently by default. For example, initial values for forscope and wchar_t language options are different compared to VS2003's default ones. I've handled this in the ConvertResponse.ini file, but, if you might check this if you'll encounter problems...
  2. Since VS2010 uses .vcxproj, you will still need to use VS2003 to alter project settings. Since you will need VS2003, you might consider naming .sln file for VS2010 differently.


For all questions, suggestions or if you'd like to share your version of ConvertResponse.ini, write to me. Please put some sane subject.

This utility is free of charge, but, if you extraordinarily love it and if you can afford, you can donate some funds. Tnx!

6 comments:

  1. I'm looking into using VS2010 with VS2003 SDK ("hybrid" multi-targeting). I created .v71.props based on VS2010's .v100.props to which I added definitions for VC71InstallDir VS71InstallDir (VS2003 counterparts to VS2010's VCInstallDir and VSInstallDir). I left the VS2010 values in the definition of ExecutablePath, and used the VS2003 values in the definitions of IncludePath, ReferencePath, LibraryPath, SourcePath and ExcludePath. Li Shao replied to Rolf Kristensen on 15 Dec 2009 (http://blogs.msdn.com/b/vcblog/archive/2009/12/08/c-native-multi-targeting.aspx) that he should define only VC10InstallDir and VS10InstallDir, but there is a need to provide another definition for WindowsSdkDir, say WindowsSdk71Dir, because it is used both in ExecutablePath and in data paths (IncludePath, LibraryPath, ExcludePath).

    ReplyDelete
  2. All of that won't be enough since VS2010 prepared command line parameters for cl.exe (and others) in Unicode, while VS2003 tools can read only ASCII. That's why I've made this utility...

    ReplyDelete
  3. WOW & thx a lot for your tool. I don't have vc70/71 at the moment, but I tried it on my vc60 toolset right now. I only had to add some 'keywords' into your .INI, and it worked! Only trouble is the manifest thingy in VS2010. I don't know if we can fully disable it for projects. So there's at least a warning about a missing 'mt.exe' in the end, but the binaries are ready anyway... cheers

    ReplyDelete
  4. i wish these instructions were more clear, the part i do not understand is number 2 " 2. Copy other files to your C:\Program Files\Microsoft Visual Studio .NET 2003\VC7\bin dir (or the equivalent)."


    am i supposed to install vs 2003 in win7 with 2010? or am i to create this directory?

    thanks.

    ReplyDelete
  5. To use VS2003 compiler from VS2010, you need to install them both.

    ReplyDelete