RNDThoughts
RNDThoughts

Reputation: 1034

How to install Visual Studio 2022 Build Tools on Windows Server Core 2022

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?

Upvotes: 8

Views: 49349

Answers (3)

Anton Lasevich
Anton Lasevich

Reputation: 206

Try with winget from cmd

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

After that you will able to see 2022 Build Tools option

Upvotes: 17

Hannah Vernon
Hannah Vernon

Reputation: 3472

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

Upvotes: 1

Dave Johnson
Dave Johnson

Reputation: 87

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

Upvotes: 3

Related Questions