The process of installing, configuring, and customizing Visual Studio to support development workflows across languages, platforms, and workloads.
Remove any trailing semicolon from the Windows TEMP and TMP environment variables, restart Windows, and then rerun the Visual Studio 2026 installer; this is the closest documented match for error 0x0000138A affecting Visual Studio setup.^1^
Correct TEMP and TMP
- Close the Microsoft Store and Visual Studio Installer.
- Press Win+R, enter
sysdm.cpl, and press Enter. - Select Advanced → Environment Variables.
- Under both User variables and System variables, inspect
TEMPandTMP. - Remove a trailing semicolon if present:
- Incorrect:
%USERPROFILE%\AppData\Local\Temp; - Correct:
%USERPROFILE%\AppData\Local\Temp - A typical system value is
C:\Windows\Temp
- Incorrect:
- Confirm that each referenced directory exists, is writable, and has adequate free space. An invalid, read-only, or full temporary directory can prevent creation of required files.^2^
- Select OK in every dialog and restart Windows.
- Retry the Enterprise bootstrapper downloaded from
my.visualstudio.com. If needed, retry Community afterward; administrator elevation has already been tested and does not need to be repeated as a separate fix.
You can inspect the effective values before changing them:
"User TEMP: $([Environment]::GetEnvironmentVariable('TEMP','User'))"
"User TMP: $([Environment]::GetEnvironmentVariable('TMP','User'))"
"System TEMP: $([Environment]::GetEnvironmentVariable('TEMP','Machine'))"
"System TMP: $([Environment]::GetEnvironmentVariable('TMP','Machine'))"
"Process TEMP: $env:TEMP"
"Process TMP: $env:TMP"
If an incomplete Visual Studio instance remains
Open Start → Visual Studio Installer. If Enterprise or Community appears under Installed, select More → Repair. Repair reacquires damaged installation payloads, but it also resets the Visual Studio environment and removes some local customizations.^3^
The Repair option is available only for installed instances. Skip this step if the edition appears only under Available or is not listed.
If 0x0000138A continues
That hexadecimal value is not listed among the documented Visual Studio command-line installer result codes, so the setup logs are needed to identify which component actually failed. Visual Studio writes logs under %TEMP%; sort that directory by date and examine files beginning with:
-
dd_bootstrapper -
dd_client -
dd_setup
These correspond to the bootstrapper, installer application, and setup engine.^4^
For a complete diagnostic package:
- Download the Microsoft Visual Studio and .NET Framework log collection tool.
- Open an elevated Command Prompt under the same Windows account used for the failed installation.
- Run
Collect.exe. - Retrieve
%TEMP%\vslogs.zip. - Open Visual Studio Installer → feedback icon → Report a problem and attach the failure details. The installer can also attach its latest setup log automatically.^5^
Last resort: remove failed setup state
Use InstallCleanup.exe only if repair or normal uninstallation fails. It can remove shared features used by other Visual Studio installations or products.^6^
- Close Visual Studio Installer.
- Back up any required Visual Studio settings.
- Open an administrator Command Prompt.
- Run the cleanup tool with the documented
-ioption for the version being reinstalled:
"C:\Program Files (x86)\Microsoft Visual Studio\Installer\InstallCleanup.exe" -i [version]
- Restart Windows and rerun a newly downloaded Visual Studio bootstrapper.
Avoid -f when the intention is to reinstall: that option removes additional shared features and is intended for removing Visual Studio without reinstalling it.
References
- problême de téléchargement - Microsoft Q&A
- Can't create necessary temporary file
- Repair your Visual Studio installation | Microsoft Learn
- Use command-line parameters to install, update, and manage Visual Studio
- Troubleshoot Visual Studio installation and upgrade issues
- Uninstall or remove Visual Studio