Automatic Visual Studio Update Reboot If Necessary

The patches for CVE-2020-0601, CVE-2020-0605 and CVE-2020-0606 caused a pending reboot on my build servers after updating visual studio.So my hope that the unattended visual studio updater script would be finished has not come true So I added a pending reboot detection: Additionally I wanted some more details in the event log regarding the version being updated and the version after the update. I added a few lines using the FileInfo class.Beside that I stop the build agent service during the update process, so that builds do not fail while MSBuild is not available. So here is the full script:

Updating Visual Studio Installer unattended, last episode, hopefully

I have written about keeping build agents up to date in the past and had issues with the vs_installer updating itself. Now again the latest updates were not deployed.After playing around with procmon and friend I found a way to remove its state, so that the installer thinks is starts from the beginning of time - so there is no update. To do so I delete a few folders before starting the installation. I updated my gist file, but cannot update or comment the VisualStudio developer community page, as the issue is closed.

Totally automated Team Foundation 2017 build agent setup

First of all set the default TLS Version for .net to 1.2: With Chocolatey a lot of things are easy to set up:Visual Studio 2017 CommunityWindows Installer XML ToolsetVisual Studio CodeGitVersionNodeJsPython2Remote Server Administration ToolsNow let's modify visual studio and add some components, so that the node-gyp can compile popular packages. We could have used the windows build tools but they default to VS 2015 and the install location of python cannot be adjusted. Visual Studio C++ core features Microsoft.VisualStudio.Component.VC.CoreIdeWindows Universal C RuntimeMicrosoft.VisualStudio.Component.Windows10SDKWindows 10 SDK (10.0.16299.0) for Desktop C++ [x86 and x64]Microsoft.VisualStudio.Component.Windows10SDK.16299.DesktopVC++ 2017 v141 toolset (x86,x64)Microsoft.VisualStudio.Component.VC.Tools.x86.x64We will also utilize code generation using T4:Text Template TransformationMicrosoft.VisualStudio.Component.TextTemplatingThe new MsBuild Project  SDKs requires the installation of .NET Core components of Visual Studio. Otherwise you’ll receive errors like “Error MSB4236: The SDK 'Microsoft.NET.Sdk' specified could not be found.”. Additionally we will add the .NET Framework targeting packs to build against several frameworks:.NET Core runtimeMicrosoft.Component.NetFX.Core.RuntimeMicrosoft.Net.Core.Component.SDK.NET Core 2.0 development toolsMicrosoft.NetCore.ComponentGroup.DevelopmentTools.NET Core 2.0 development toolsThe next issues arise: Visual Studio installer is lacking the –wait argument on the command line. So we need to start it as a new process and wait: Next update Visual Studio to its latest version: For Windows Installer XML Toolset we also want the Wix Toolset Visual Studio 2017 Extension to be installed. So we download the latest version from the Visual Studio Marketplace and install it silently: For python we need to add the install location to the path variable:Using NPM we nee to install the following packages globally:Node.js native addon build toolNode SassGulp And finally all together - the final script: HTH

Builds with conditional NuGet publishing in Team Foundation Server

For a nightly build it makes no sense to publish a NuGet package as no code changed and therefore the same GitVersion is calculated.Since version 2017 Update 3 the on premise version of Microsoft's Team Foundation Server supports "Custom Conditions" on "Build Tasks" – but sadly not on "Task Groups".Here is what you need to exclude a step from a scheduled build: Here a screenshot of the condition in action:HTH

Data Lake WTF

After an Update of Visual Studio 2015 (14) I wanted to use my usual keyboard short cut ([ALT] + [D]) to expand the “Debug”-menu and … Two menu entries listening to [D] now? For this ridiculous amount of 4 (in words four) menu entries? Seriously? Just delete the folder. And voila: Back. Productive. Done. Dear Microsoft, please stop that kind of *marketing* making developers every day life harder. I know you can do much better! HTH,Daniel

.NET Framework 4.6 Release

The new framework version is out. As with every new release it seems to me that the search indexes on Microsoft downloads have not been rebuilt yet. So I abuse this blog post and note the download links to myself…Microsoft .NET Framework 4.6 (Offline Installer) for Windows Vista SP2, Windows 7 SP1, Windows 8, Windows 8.1, Windows Server 2008 SP2 Windows Server 2008 R2 SP1, Windows Server 2012 and Windows Server 2012 R2 Microsoft Build Tools 2015Windows 10 and .NET Framework 4.6 SDKIntelliTrace Collector for Visual Studio 2015 (Just replace the Version number in the Installation Path)