Windows preview build delayed & Visual Studio 2022 updates

Impact

Slicer Preview application and extension packages of 2023-04-21T03:00:00Z for Windows will be available later than expected.

Update Details

Installed components for UWP/ARM64 development

To support the development of the SlicerMixedReality extension, we needed to install new Visual Studio 2022 workloads & components to support Universal Windows Platform (UWP) development targeting ARM64.

Updated C & CXX compilers

In the process, the version of the C & CXX compilers provided by Visual Studio 2022 changed and is summarized below:

MSVC compiler identification Path
Before 19.30.30709.0 C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.30.30705/bin/Hostx64/x64/cl.exe
After 19.35.32217.1 C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.35.32215/bin/Hostx64/x64/cl.exe

Impact on Slicer extension stable builds

To support building the Stable extension, the SlicerConfig.make file[1] was updated replacing the 4 occurrences of 14.30.30705 with 14.35.32215.

This is required to ensure the updated compiler used to build the nightly Stable extensions matches the one hard-coded in SlicerConfig.cmake. Indeed, there is a consistency check implemented in slicer_config_set_compiler_ep defined and called from within SlicerConfig

What about the ABI compatibility ?

Since binaries are built with the v143 toolset, extensions build with the updated compiler will be compatible[2] with the stable release built with an older compiler but also targeting the same toolset.

The infamous "Sorry, something went wrong" VS2022 update error

When attempting to install new Visual Studio 2022 components (through ), it was failing with Sorry, something went wrong.

Inspecting the log file %temp%\dd_installer_YYYYMMDDHHMMSS.log, there were errors.

The steps are provided for future reference and where adapted from details provided by Philippe Debayle at https://developercommunity.visualstudio.com/t/Unable-to-use-VSInstaller-because-it-sys/10323762#T-N10323790-N10323885

  1. To Fix the communication issue preventing developer news from being displayed:

    • Edit C:\Program Files (x86)\Microsoft Visual Studio\Installer\setup.exe.config
    • Add Switch.System.Net.DontEnableSchUseStrongCrypto=false; to the value attribute
      of the AppContextSwitchOverrides element.
  2. Address the Error 0x80070057: Failed to read instance xxxxxx" (where xxxx is the vs instance number)

    • Go to %localappdata%\Microsoft\VisualStudio\Packages\_Channels\<vs instance number>
    • Edit the file channelmanifest.json as administrator (Create a copy of the file first)
    • Copy the content of the file into an online JSON prettifier (e.g https://codebeautify.org/jsonviewer), then switch the editor mode from View to Text.
    • Copy the formatted content into the channelmanifest.json file
    • In editor like “Notepad++”, search for all occurrences "id" in all files (with the double quotes")
    • Append .arm64 to the id of each channel associated with "productArch": "arm64". The goal is to have all top-level ChannelProduct identifier unique,
  3. Run setup.exe as described in the dd_installer_*.log file by specifying the additional parameter --channelUri C:\path\to\modifed\channelmanifest.json

This allowed to move forward with the update process.


  1. C:\path\to\S\S-0-build\Slicer-build\SlicerConfig.make ↩︎

  2. C++ binary compatibility 2015-2022 | Microsoft Learn ↩︎

1 Like