Visual Studio Setup
Installation and containerization of the Visual Studio family of products
Latest posts
Configure Visual Studio across your organization with .vsconfig
Add a .vsconfig file to your solution root directory to configure Visual Studio consistently across your organization.
Older versions of Visual Studio 2017 will not install in Windows Server 2019 containers
If you try to install Build Tools for Visual Studio 2017 into a Windows Server 2019 or newer container image, such as or , the install will quickly terminate without error and without installing anything. This is due, in part, to changes to the Windows Server container image to reduce size and improve startup performance. To install into Windows Server Core 2019 or newer, please download Visual Studio 2017 version 15.9 or newer, including Visual Studio 2019 Preview 1. Note: all previous Windows container images are now available in the Microsoft Container Registry (MCR), and all new container images includ...
Workaround for 0x8007007e when trying to to locate an instance of Visual Studio
We are investigating how a particular rare problem occurs that can prevent clients like VSIXInstaller.exe, vswhere.exe, and others from finding any Visual Studio instance that results in an error similar to the following: This is the CLSID for the Visual Studio Installer query API, and despite being registered the COM server DLL is missing. Workaround The easiest way to work around this problem is to repair any instance of Visual Studio. Warning: this will reset your Visual Studio settings: Along with resetting your Visual Studio settings, this can take quite a while to complete. A faster wa...
Docker recipes available for Visual Studio Build Tools
Use or contribute your own Dockerfiles on GitHub to help others build similar workloads with Visual Studio Build Tools.
No container image for Build Tools for Visual Studio 2017
The size and permutations of Build Tools 2017 container images are too great to publish official images, but here's how you can create your own tailored images.
vswhere now supports -utf8 to override console code page
You can now force vswhere to output JSON using the UTF-8 encoding.
Updated documentation for Visual Studio Build Tools container
The .NET Framework may not be correctly installed into a Windows Server Core container, and managed code - like the compilers - may fail. The documentation was updated with how to work around this.
vswhere now supports -requiresAny to find instances with one or more components installed
You can now use -requiresAny with vswhere to specify that any component ID passed to -requires will satisfy the query.
Set both x86 and x64 registry views for custom setup policy
Due to a bug in older versions of Visual Studio 2017, you should set the CachePath policy in both 32- and 64-bit views of the registry.
How to install Builds Tools in a Docker container
Preview new documentation for how to install Build Tools for Visual Studio 2017 into a Docker container.
New vswhere: now with more properties!
Read about all the new properties output by vswhere.
Installing Build Tools for Visual Studio 2017 in a Docker container
Follow this guidance to install Build Tools for Visual Studio 2017 into a Docker container and save the image for later.
Cleaning up corrupt Visual Studio instances
When older versions of Visual Studio 2017 report an error about not being able to load the instance, follow these instructions to clean up corrupt instances and re-install.
vswhere version 2.0 released
A new major version of vswhere is released with the breaking change to filter out preview releases by default.
Disabling or moving the Visual Studio 2017 package cache is now generally available
With the release of Visual Studio 2017 version 15.2, the ability to disable or move the package cache is now generally available and documented. Basically, payloads are removed after being installed or repaired, and we will download them again if ever needed (like when repairing the product instance). This does mean if you work offline and need to repair you will need to re-connect to the internet or from wherever you installed Visual Studio (like a network layout). See our release notes for more information about what's new in 15.2 and download today!
Documentation now live for moving or disabling the package cache
I previously wrote about moving or disabling the package cache for Visual Studio 2017, which is a feature in the latest preview of Visual Studio 2017 and will be generally available update 15.2 is released. We have now published the documentation along with related material for administrators or developers looking to take more control of their installations, including: If you're in the Preview channel please give the no-cache policy and send us feedback using the Feedback tool. If you're not in the Preview channel and interested in trying features early, please visit https://www.visualstudio.com/vs/pr...
vswhere is now installed with Visual Studio 2017
Starting in the latest preview release of Visual Studio version 15.2 (26418.1-Preview), you can now find vswhere installed in "%ProgramFiles(x86)%\Microsoft Visual Studio\Installer" (on 32-bit operating systems before Windows 10, you should use "%ProgramFiles%\Microsoft Visual Studio\Installer"). While I initially made vswhere.exe available via NuGet and Chocolatey for easy acquisition, some projects do not use package managers nor do most projects want to commit binaries to a git repository (since each version with little compression would be downloaded to every repo without a filter like git LFS). So starting...
Cleaning up the Visual Studio 2017 package cache
With the ability to disable or move the package cache for Visual Studio 2017 and other products installed with the new installer, packages are removed for whatever instance(s) you are installing, modifying, or repairing. If you have a lot of instances and want to clean all of them up easily from the command line - perhaps scripting it for users in an organization - you can combine tools such as vswhere or the VSSetup PowerShell module with the installer at %ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vs_installer.exe. Batch script with vswhere You can get the installation path for all instances and ...
Moving or disabling the package cache for Visual Studio 2017
In the latest preview release of Visual Studio we are introducing the ability to disable (or re-enable) the package cache, or move it to another drive. This can be done using the command line or the registry, which can be deployed on a domain using group policy. This will be generally available in Visual Studio in a few weeks - scheduled for the 15.2 update - but we want to give you a preview and collect feedback on the feature. Command line If you pass to the installer - even if just starting the installer - the cache policy is set to disable caching of packages, and any modification or repair of an instance wi...
vswhere now searches older versions of Visual Studio
One of the top requests I kept hearing for vswhere was to also search older versions of Visual Studio. You can now do that starting with the latest release. Even if you don't have Visual Studio 2017 or newer installed - which means the query API is not even registered - you can use vswhere to find the installation root directory for Visual Studio 2010 and newer. There are some caveats: All the other vswhere parameters that control the output format and selection still work. For example, if you wanted to find the path to the latest version of Visual Studio 2010 through Visual Studio 2014. O...
Fast acquisition of vswhere
I introduced vswhere last week as an easy means to locate Visual Studio 2017 and newer, along with other products installed with our new installer that provides faster downloads and installs - even for full installs (which has roughly doubled in size with lots of new third-party content). vswhere was designed to be a fast, small, single-file executable you could download and even redistribute in a build pipeline or for other uses. To make this easy to acquire, I've published both a NuGet package and made vswhere available via Chocolatey. [code gutter="false"]choco install vswhere vswhere -latest -products * -re...
vswhere Available
After feedback on the VSSetup PowerShell module to query Visual Studio 2017 and related products, I'm pleased to say that a native, single-file executable is available on GitHub: vswhere. The VSSetup PowerShell module is also available on GitHub and provides a number of benefits for PowerShell scripts, but build tools and CMake and deployment scripts wanted a simple executable they could redistribute without spawning PowerShell. You can enumerate instances with optional demands on which products, workloads, and components; and on which versions you require. Results can be printed in a variety of formats - curren...
Visual Studio Setup PowerShell Module Available
To make the new setup configuration APIs more accessible to developers, we have published the "VSSetup" PowerShell module on powershellgallery.com, making it quick and easy to install. If you have Windows Management Framework (WMF) 5.0 or newer - installed with Windows 10 - or PowerShellGet for PowerShell 3.0 or 4.0, you can run the following from even an unelevated PowerShell host: You can also install for all users if you leave off the parameter entirely. You can also download and extract a ZIP archive from our Releases page on the project page. After installing, you can quickly enumerate all launchable ins...
Documentation available for the Setup Configuration API
Visual Studio 2017 has brought big changes to extensibility that allow developers to install extensions to different instances and install dependencies. In support of multiple instances, a fast API was required that tools can use to find and launch Visual Studio and related tools, or to install extensions. I previously published some samples, and now documentation for these APIs is available. The documentation is based on the runtime-callable wrapper (RCW) - the .NET interop assemblies - for the native configuration API. The main difference is that the native API will return an while the RCW will throw a where...
Changes to Visual Studio “15” Setup
We've listened to feedback over the years, and while each new release brought changes to the setup experience of Visual Studio and related products, none have been more significant than what we're doing for Visual Studio "15". New setup engine With Visual Studio supporting so many platforms and toolkits, one of the goals for Visual Studio "15" is to provide choice and install just what you need. To make it easier for our partners to author component packages for Visual Studio while making sure you get all the required components, an underlying engine needs to provide granularity and cohesion with dependencies. Ex...
Insert GUIDs directly into Visual Studio Code
Let me preface this by stating I love Visual Studio Code! While I think its big, older brother Visual Studio is great for large solutions or even small projects where project files are managed automatically by the IDE, Code work great for small, loose projects and is very fast. I still use Vim for a lot of quick edits in a console (I spend a lot of time in powershell.exe even when using Visual Studio for development) but Code has quickly been filling that niche for source code in various languages. But when frequently having to author GUIDs for something-or-other, my routine of generating GUIDs in different form...
Get the Windows Installer PowerShell Module easier with WMF 5.0
Many years ago when PowerShell was first in beta, I saw an opportunity to write cmdlets that I could string together in different ways rather than writing and maintaining a bunch of one-off Windows scripts for various day-to-day tasks and customer diagnostics. I created the Windows Installer PowerShell Module to fill that role. These cmdlets are now used heavily in many tasks internally and, I hope, in the wild.Fast-forward to today – with the release of the Windows Management Framework 5.0, which includes PowerShell and a host of other great administrative features – you can get new versions of the m...
Failure when upgrading from VS2015 RTM to VS2015 with Update 1
If you have Visual Studio 2015 RTM installed and attempt to install Visual Studio 2015 with Update 1, you may see a failure like the screenshot that reads, KB3022398 This action is only valid for products that are currently installed. This is a fatal error that occurs when upgrading from VS 2015 RTM to the VS 2015 slipstream release. The slipsteram is RTM + VSU1 merged together for a faster install – especially for new customers wnated to install the latest VS2015. Solution If you encounter this error, you need only repair the product and setup will continue normally. Descrip...
Removing Visual Studio components left behind after an uninstall
When you install Visual Studio and related content like Windows Kits or some add-ons, most packages that comprise those bundles are reference counted to make sure they are not removed prematurely. Uninstalling Visual Studio and related content should eventually remove those packages (i.e. last one out the door turns off the light). Contrast with older releases where almost everything was left installed because we couldn’t be sure which other products still required them.Some packages, however, do get left behind. Some are packages that do not participate in package ref-counting – often those that we d...
How to install Visual Studio to another directory when a pre-release is installed
If you’ve installed pre-release versions of Visual Studio – or even another edition of the same release – you may find you can’t change the installation target directory. This is because once a set of shared components is installed, we install all the other components to the same directory structure. When you have multiple editions installed, this save disk space since shared files occupy the same location on disk – not to mention results in faster install times since Windows Installer doesn’t copy the same bits again. And while we do support build-to-build upgrades, those shar...
Redirect the Package Cache using registry-based policy
Visual Studio can require a lot of space on the system drive, and previous methods of redirecting the Package Cache can be tricky for some people to set up or even maintain as junctions across volumes may be removed on boot. The cache is there for good reasons and has significantly reduced the failure rate, but for people with smaller system drives or partitions it can be a barrier. Deleting the cache directory in its entirety can also lead to problems. So a design change was made to the WiX setup chainer, Burn, to support setting a registry-based policy to redirect the cache to another partition. This registry ...
Visual Studio 2013 continuously repairs producing many small log files
If you have Microsoft Visual Studio 2013 Professional, Premium, or Ultimate editions installed and are finding many small MSI*.log files in your %TEMP% directory, you may find you are running low on disk space because of how many of these files are created. While they may only be about 3MB, what causes these files to be produced can do so often enough that it may not take long to fill up the drive where %TEMP% resides. Workaround We are consistently seeing this issue caused by a missing directory, C:\Windows\Microsoft.NET\Framework\URTInstall_GAC (or %SystemRoot%\Microsoft.NET\Framework\URTInstall_GAC). To work ...
Detection keys for Visual Studio 2015
Administrators and developers who need to detect whether Visual Studio 2015 is installed can use similar registry keys as with past releases. This time around, though, we’ve made some changes to the lineup of products but the registry scheme remains the same. Most of the detection keys are found in the 32-bit registry hive – the ones you’ll typically want to detect, anyway. Following is a table of the products we’ve announced. The biggest change to the detection keys is that Enterprise replaces Premium and Ultimate. Community is also a subset of Professional which is a subset of Enterprise, so if you yo...
Workaround for when Visual Studio Update says it doesn’t apply
I previously blogged about a problem some customers were running into that prevented Visual Studio Update from installing. You might see a dialog like the one to the right and an error message that read something like, Update 2 does not apply, or is blocked by another condition on your computer. At least for many people, they had an applicable Visual Studio installed. From the logs alone, however, we were unable to determine the root cause and certainly never ran into it during countless tests across not only the division but dogfooding across the company…until recently. One cause of this problem is when...
Workaround for when Visual Studio Update says it doesn’t apply
I previously blogged about a problem some customers were running into that prevented Visual Studio Update from installing. You might see a dialog like the one to the right and an error message that read something like, Update 2 does not apply, or is blocked by another condition on your computer. At least for many people, they had an applicable Visual Studio installed. From the logs alone, however, we were unable to determine the root cause and certainly never ran into it during countless tests across not only the division but dogfooding across the company…until recently. One cause of this problem is when the...
How to register your program for file extensions shared with other programs
One frequently asked question is, “how do we register our program for a file extension when other versions (or programs) that handle it might also be installed?” The overarching question is really about how to have non-shared resources both write to a shared resource. But in the case with the Windows registry and file associations in general, your file can only be associated with one program. That is, double-clicking on the file can only open one program unless some other intermediate system decides otherwise. Windows Vista introduced such a system. The Default Programs feature - which includes ...
Visual Studio 2010 uninstall utility back online
Four years ago I published a utility to help perform a clean uninstall of Visual Studio 2010. Before we added package reference counting and related bundles to Visual Studio setup, we couldn’t always be sure which products were still required so not everything was removed. This utility will remove everything provided one of a few command line options documented in the original article.Unfortunately, the old site where the utility was hosted was archived and some readers recently pointed this out. I’ve since reposted the utility on the Microsoft Download Center and created a short URL (https://aka.ms/v...
Seeing colors with psake
Psake (pronounced like Japanese “sake”) is a build automation tool similar to others out there like make, rake, etc., but built using PowerShell as the language of choice. So it should be no surprise that I use it for my Windows Installer PowerShell Module. It’s useful for automating tasks not limited to just calling MSBuild, but also my PowerShell Help compiler (which loads the module in a separate process, thus allowing me to keep building in the same PowerShell host process), and selected tests with MSTest. When tests fail (and when practicing TDD they often do), it can be hard to identify wh...
Update does not apply or is blocked by another condition on your computer
We have investigated reports of some installs of Visual Studio 2013 Update 2 reporting that no applicable updates are available even when VS2013 is installed. We have been unable to reproduce the cause in our labs and besides offering a workaround, we would like to ask for your assistance if you can reproduce the problem in the specific scenario described below. Problem When trying to install V2013 Update 2, you may see an error that reads, Update 2 does not apply, or is blocked by another condition on your computer. This is the result of either not having a qualifying product like Visual Studio 2013 Professi...
Incorrect hash value when installing Visual Studio 2013 Update 2
Visual Studio 2013 Update 2 RC introduces some cool new features and adds an option to slipstream the install of VS2013 RTM with Update 2 RC, but some attempts to download it have had the following problem. Problem When installing VS2013 Update 2 you see the error or warning message, “The hash value is not correct.” This will show up as either an error or a warning depending on the package. If you open the log file by clicking on the link in the Finish page, you may see an error like the following, [1543:4DC8][2014-04-03T13:05:00]e000: Error 0x80091007: Hash mismatch for path: C:\ProgramData\Package Cache\....
Error in installation log for Visual Studio 2013 Update 2 RC can be misleading
Given many of the exciting announcements and features demonstrated recently at Build 2014, customers are downloading Visual Studio 2013 Update 2 RC. This update is quite a bit bigger than VS2013 Update 1 since it contains many new features. A small number of customers, however, are experiencing problems installing VS2013.2 RC. Symptoms While specific symptoms vary, some customers see an error dialog almost immediately or they see warnings after installation completes successfully. In these cases, customers have spotted the following error in the bundle installation log: [1543:4DC8][2014-04-09T12:00:30]e000: Er...
How to relocate the Package Cache
Visual Studio can require a lot of space on the system drive. Based on years of data collected from customers’ installations from the Customer Experience Improvement Program, we took advantage of this feature in Burn – the Windows Installer XML (WiX) chainer – to eliminate most errors during repair, servicing, and even uninstall. This was not a popular decision with some customers. For years even I pushed against caching Visual Studio deployment packages because of the impact to drive space as well, but as HDD space increased market studies showed little reason not to cache for the increased reliability of deploy...
Upgrading Visual Studio 2013 Update to a newer Update may be slow
Our first public release of Visual Studio Update for Microsoft Visual Studio 2013 is available. There are, however, a couple of known issues in hopefully uncommon scenarios. Fixed We have fixed this in future versions of Visual Studio Update. This post is kept for historical reasons should any users have problems upgrading from pre-release versions of Visual Studio 2013 Update 1 to the final release bits of VSUpdate 1. Technically, this was fixed for VSUpdate 1 RTM, but the fix has to be in the release getting upgraded, so going from VSUpdate 1 RTM to any future CTP or release bits will not exhibit this prob...
Uninstalling Visual Studio 2013 with VSUpdate error: Element not found
Our first public release of Visual Studio Update for Microsoft Visual Studio 2013 is available. There are, however, a couple of known issues in hopefully uncommon scenarios. Symptom If you attempt to uninstall Visual Studio 2013 after VSUpdate has been installed, you may see an error after a while that reads “Element not found.” VS2013 may not be completely uninstalled from your machine. Workaround Try uninstalling VS2013 again from Programs and Features. This should completely uninstall all but a few packages (like the .NET Framework and any other packages shared with other bundles) from your machine. More ...
Visual Studio 2013 shortcuts in Windows 8.1
Windows 8.1 made a change for RTM – as some MSDN Subscribers might’ve noticed – where newly installed applications’ shortcuts are not immediately visible on the Start menu. They are still installed and indexed, but you need to either swipe down on your touch screen or click the down arrow as shown below. On the Start menu, you can also just begin typing. Application shortcuts – along with files and settings – are displayed matching the text you typed. Just start typing “Visual Studio” and you’ll see a list of applications you can launch. This behavior is the same for modern and desktop applications, put...