3

I am attempting to install Visual Studio 2022 Build tools on a fully updated Windows Server 2022 Core installation as a virtual machine on ESXi. Whenever I start the setup, I see the GUI appear while it's extracting files and then it crashes leaving an event log entry:

Application: vs_setup_bootstrapper.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.NotImplementedException
   at MS.Win32.UnsafeNativeMethods+ITfThreadMgr.CreateDocumentMgr(ITfDocumentMgr ByRef)
   at System.Windows.Input.TextServicesContext.RegisterTextStore(System.Windows.Input.DefaultTextStore)
   at System.Windows.Input.DefaultTextStore.get_Current()
   at System.Windows.Input.TextServicesContext.SetFocusOnDefaultTextStore()
   at System.Windows.Input.InputMethod.EnableOrDisableInputMethod(Boolean)
   at System.Windows.Input.TextServicesManager.Focus(System.Windows.DependencyObject)
   at System.Windows.Input.KeyboardDevice.ChangeFocus(System.Windows.DependencyObject, Int32)
   at System.Windows.Input.KeyboardDevice.TryChangeFocus(System.Windows.DependencyObject, System.Windows.Input.IKeyboardInputProvider, Boolean, Boolean, Boolean)
   at System.Windows.Input.KeyboardDevice.Focus(System.Windows.DependencyObject, Boolean, Boolean, Boolean)
   at System.Windows.Input.KeyboardDevice.Focus(System.Windows.IInputElement)

I have also tried manually extracting the files and running but the same thing happens using this guide because the installer itself is crashing:

https://silentinstallhq.com/visual-studio-build-tools-2022-silent-install-how-to-guide/

Can anyone advise why it's failing?

RNDThoughts
  • 892
  • 3
  • 13
  • 30

3 Answers3

4

Try with winget from cmd

winget install --id=Microsoft.VisualStudio.2022.BuildTools -e

After that you will able to see 2022 Build Tools option

1

Installation of Visual Studio Build Tools 2022 on Windows Server 2022 Core will always fail as the Visual Studio Build Tools 2022 will only identify the 2016 and 2019 versions of Windows Server Core as installation candidates, even if a silent installation is requested. The installer will attempt to throw a GUI exception (which Core cannot handle).

The only method for running Visual Studio Build Tools 2022 on Windows Server Core is by doing so on versions 2016 or 2019. Microsoft calls this out specifically in their documentation (from: https://learn.microsoft.com/en-us/visualstudio/releases/2022/system-requirements#microsoft-visual-studio-build-tools-2022-system-requirements):

Microsoft Visual Studio Build Tools 2022 system requirements

  • I believe the MS Learn System Requiremenst document doesn't include 2022 by mistake. You can install the VS2022 Build Tools on Windows Server 2022 Core - I was able to get it to install by running an unattended install as detail in my answer. – Hannah Vernon Mar 02 '23 at 19:13
  • I suspect the docs just haven't been updated. Windows 2022 was released after VS2022. – jessehouwing Mar 03 '23 at 16:17
1

I was able to install the Visual Studio 2022 Build Tools on Windows Server Core 2022 by creating a network installation source for the Build Tools, customizing the response.json file to indicate the components I wanted installed, then running the installer on the Core Server from the network layout using \\server\fileshare\layout_folder\vs_setup.exe --noweb --quiet --wait --norestart.

Instructions for creating a network installation source are here.

Details on how to customize the response.json layout file are here

Details on how to install the binaries from the network installation on a Core Server are here.

I was able to reconfigure the Visual Studio Build Tools by running the vs_installer.exe:

C:\Program Files (x86)\Microsoft Visual Studio\Installer>vs_installer

Hannah Vernon
  • 3,367
  • 1
  • 26
  • 48