What’s new for C++ cross-platform developers in Visual Studio 2022

Erika

Visual Studio 2022 is available now! Check out the video below to learn what’s new for C++ developers who are building for more than just Windows, or who are developing with an eye to open source. This video covers: 

Contact us

Have questions or comments about Visual Studio 2022? Want to share feedback with our team? You can contact us at visualcpp@microsoft.com or on Twitter (@VisualC). The best way to file a bug or suggest a feature is with the Send Feedback button in the upper right-hand corner of the IDE. See How to report a problem with Visual Studio or Visual Studio Installer for more information.  

5 comments

Leave a comment

  • Foo Bar

    I’m really glad the VS team is invested in making cross-platform development with CMake more user friendly. Visual Studio is an excellent IDE and CMake is a solid build system.

    I have 2 main concerns:

    Learning CMake:

    Teaching more and more people how to use CMake. It would be great if Microsoft helped upstream tutorials and documentation to CMake with up to date practices.
    https://gitlab.kitware.com/cmake/cmake

    The current official CMake tutorial is really bare bones. It would be nice to have a full DX12 tutorial, or something like that. Explaining best practices, and understanding the windows platform.

    There are no good top down explains of understanding the MSVC toolchain that I have found anywhere (except at my company where I have written it all down). Most people don’t even know about the resource compiler.

    WDK support:

    It would be really great for driver development if the WDK received the same level of love as the SDK. Working on drivers we had to write our own custom toolchains to work with the WDK. Which isn’t ideal.

    And CMake doesn’t seem to fully support it well either.

  • Vladimir Serdyuk

    Thank you Microsoft for moving in the right direction of supporting cross-platform development.
    Still, I’d like to draw some attention to the fact that the way CMake build presets are implemented in Visual Studio is explicitly discouraged by CMake developers. As Erica commented earlier, current approach is to have separate configure presets and build trees for each build preset.
    See https://cmake.org/cmake/help/latest/guide/ide-integration/index.html#configuring:

    IDEs should avoid creating more build trees than necessary, and only create multiple build trees if the user wishes to switch to a different compiler, use different compile flags, etc. In particular, IDEs should NOT create multiple single-config build trees which all have the same properties except for a differing CMAKE_BUILD_TYPE, effectively creating a multi-config environment. Instead, the Ninja Multi-Config generator, in conjunction with the File API to get the list of build configurations, should be used for this purpose.

    That would allow faster switching between deubg/release without relaunching CMake cache generation.

    Ninja Multi-Config support suggestion issue haven’t seen any interest from VS developers. Apart from Ninja Multi-Config there is a Visual Studio generator which is multi-config too.

  • 汪 恺

    Thanks you for the CMake support better and better.
    I am enjoying it.
    I have 3 concerns:
    1. In my use of VS, CMakeList.txt file changes will cause the re-generation, parsing and solution tree refreshing.
    It may takes long. Would you please optimize it ?
    2. New CMake project has only one x64-debug, Would you please add Win/Linux(clang) x86/x64 , totally 4 configuration by default?
    3. Would some hot/critical CMake settings(like MTd/MT, static/dynamic etc) can be added to UI setting window?