I'm fed up with MSFT Visual Studio installers
Spoiler: this somehow turned into a rant halfway through the writing, feel free to skip this post.
Visual Studio is one of the flagship products Microsoft has to offer - yet it has an incredible painful and error-prone installation experience. IMO we shouldn’t be accepting this nonsense in 2020.
I just don’t get it: VisualStudio is supposedly being used by MANY BIG companies all over the world. Either I’m doing something different from everybody else, or the offline installer options for Visual Studio 2017 and above are simply broken by design. Some of the battles I fought with VS installers are documented on StackOverflow (1: VS2017 layout upgrade, 2: VS2019 ‘–noUpdateInstaller’).
It should be possible to have a whole fleet of computers running the exact same version of VS, shouldn’t it? Of course it should be! Imagine 100 hosts each running a arbitrary version of a compiler, toolset, whatever. Imagine each of these hosts reach out to the internet when a update is available and download many gigabyte of data - 100x many gigabyte is a freaking lot of data!
Yes, there is a documented section on how to create a “offline layout’” for Visual Studio installations, but guess what, it’s a freaking nightmare to maintain those layouts once you’re set up. Don’t dare to ask if you’re able to roll back to an older release you’ve installed previously from the very same layout - nonono says MSFT “not a supported scenario”!
I really could look past this, if it were the only issue - just create a fresh layout for each version/upgrade you’re going to deploy, unfortunately you cannot use a newly created layout to upgrade an existing installation of VS most of the time! You’ll have to clone the existing layout, try to upgrade it - which doesn’t work that well - and upgrade from there.
Oh, and of course the installer behaves different when you’ve got an active internet connection compared to a fully disconnected network. w.t.f. (see 2: VS2019 ‘–noUpdateInstaller’)
The “Tip” on create-a-network-installation-of-visual-studio says
If you want to install from an offline source on a non-internet connected computer, specify both the –noWeb and –noUpdateInstaller options. The former prevents downloading updated workloads, components, and so on. The latter prevents the installer from self-updating from the web.
what’s missing there is that the command execution will actually fail if a newer version of the installer is available with exit code ‘1’.
The ‘-noUpdateInstaller’ switch you can pass to prevent the VisualStudio Installer from updating itself will fail the installation with an exit code of ‘1’ on a computer with internet access if a newer version of the installer exists on the web - so you should not be using it on computers connected to the internet, but on the other hand you need to pass this switch on fully offline setups because otherwise the installation will fail because it wouldn’t tolerate that it could not check for a newer version. This is broken by design! When installing from an OFFLINE LAYOUT, why would the installer ever need to reach out to the internet? It should not be acceptable that you risk installing a newer version than what you prepared on your network share if you miss passing the ‘-noweb’ switch.
This can break things!
To give an example: from VisualStudio 16.3 to 16.6 (the current VS2019 release), new warnings have been introduced in MSVC (or the settings responsible for emitting these warnings) - if you’ve got a ‘no-warnings’ policy or treat warnings as errors in your CI system, an accidental upgrade of VisualStudio will actively break your builds. This is hardly acceptable, and also one of the things I can’t get my head around.
Why do the offline deployments for MS Office work so well? Are different folks responsible for creating the installers of Office and VisualStudio? How come so few people are talking about offline deployments of VisualStudio anymore? This was a no-brainer and just worked on VS 6, VS 2005 and VS 2010.
What benefit do we really get from VSIX?
How can a company as Microsoft come up with msi move on to msix and vsix? I don’t see anything getting better in these technologies and frameworks. Don’t even get me started on WinGet.
From my point of view, the Windows installer ecosystem is broken beyond repair - beyond repair because Microsoft obviously doesn’t listen, or worse - doesn’t care because they are making money off it.
I’d probably go crazy if I wouldn’t be using the Chocolatey package manager - which really makes it as easy as can be to distribute and run the required deployment scripts.
Sorry for the rant, hope you’re having a better time deploying VisualStudio in your environments - please leave a comment if you do, and tell me where I went wrong 😄
~ happy hacking, till next time ~