c++windowsvisual-studiovisual-studio-2022visual-c++-6

Upgrade "Visual C++ 6" Solution/Project to "VS2022" Solution/Project


I work with VS2022 on Windows 11 Pro, and I have a Visual Studio C++ project from 2006 (contains DSW and DSP files): https://www.codeproject.com/Articles/1796/XListCtrl-A-custom-draw-list-control-with-subitem

After some reading, it seems that VS2022 is unable to handle the auto-upgrade and that auto-upgrade extends only up to VS2019. I prefer not to install VS2019 solely for this purpose, and I'm attempting to avoid the process of creating a restore point, installing VS2019, and then reverting to the restore point. Is there an alternative method to auto-upgrade these DSW/DSP files so that the code can be opened and built using VS2022?


Solution

  • Reluctantly, I created a restore point labeled X, installed VS2019 (just the "Desktop development with C++"), converted the solution (resulting in the conversion of all associated projects), and then reverted back to the X restore point. For cleanup: I deleted the DSW file and for each project: the DSP file, the conversion Log file. * Ensure that the conversion folder is located on a different drive, otherwise the conversion will be deleted during the restoration process.

    Additional steps were necessary:

    1. The .vcxproj and .manifest files had an .xml extension (For example: XListCtrlDS.vcxproj.xml) that required manual removal to enable loading by VS2022 from the solution.

    2. In Solution | Properties, I had to create a x64 configuration. I opened the Configuration Manager... and under Active solution platform: I selected New... | x64, opting to replicate settings from the x86 platform configuration (for a start). For extra: Under Edit... I removed the x86 configuration as it isn't relevant to my needs.

    At this point when I open the solution, VS2022 open the solution, loads all the projects, but the projects are labeled as: (Visual Studio 2019).

    For each project: Properties (When Configuration: All Configurations and Platform: All Platforms):

    1. Set | General | Platform toolset to Visual Studio 2022 (v143). For extra: I changed C++ Language Standard to ISO C++20 Standard.

    2. Edit | C/C++ | General | Additional Include Directories I added: ..\XListCtrlLib to let stdafx.h to be found.