Force uninstall Visual Studio 2017 Release candidates

If you, like me, are stuck trying to upgrade Visual Studio 2017, then you may only get unblocked by removing everything and starting afresh. Since Visual Studio 2017 is still in Release Candidate and not final, this is something we may have to deal with from time to time.

But when the "uninstall" button in the ui fails, you may end up stuck. In that case, you'll be happy to find:

C:\Program Files (x86)\Microsoft Visual Studio\Installer\resources\app\layout\installcleanup.exe

Which will perform the same actions as the good old "vssetup.exe /uninstall /force". If that doesn't get you unstuck, there is an even more forceful way:

Delete everything under:

  • C:\ProgramData\Microsoft\VisualStudio\15.0
  • C:\ProgramData\Microsoft\VisualStudio\Packages
  • %appdata%\Microsoft\VisualStudio\15.0*
  • %appdata%\Microsoft\VisualStudio\Packages
  • C:\Program Files (x86)\Microsoft Visual Studio\2017
  • HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\15.0*
  • HKEY_LOCAL_MACHINESOFTWARE\Microsoft\VisualStudio\15.0*

Add :8080 to your TFS 2017 bindings after upgrading to SSL

Because TFS 2017 allows authentication with Personal Access Tokens (PAT) it's recommended to upgrade to SSL if you were still on port 80. The installer will even help with the configuration and can add a redirect from port :80 to :443.

It doesn't add a a redirect from port :8080 though, so your users may have to update all their bookmarks. Or you can add that second binding in IIS yourself:

And that will help your users find the new location more easily.

Solve basic auth proxy issues with Nuget, Visual Studio and Xamarin (hack)

When you're using Visual Studio behind a Basic Authenticaton proxy, you may run into issues restoring Nuget packages. While I've never found a real solution for the issue, and trust me I've tried quite a few workarounds like the ones listed here.

You'll get the following error:

[5:06] Download failed. Please download and put it to the C:UsersuserAppDataLocalXamarinXamarin.Android.Support.Design23.3.0.0 directory.
[5:06] Reason: The remote server returned an error: (407) Proxy Authentication Required.

I've come to rely on my trusted hacking friend Fiddler and turn on "Automatically Authenticate".

Optionally configure your upstream proxy in Fiddler:

Restart Visual Studio so it picks up Fiddler as the proxy and you're good to go. Just leave Fiddler running in the background and all will be well.

Reference specific line of a file in the Code hub

One of the features of GitHub I use quite often is the ability to right-click any line number to create a link to that specific file on the exact line. It can eb useful when submitting issues or when providing a link to a piece of sample code.

While not so easy to find in VsTeam, the feature is there. To link to a specific line in the code hub first navigate to the file you want to link to, then copy the current location from the browser and append &line={number}.

That's all!

Publish Build Tasks to TFS 2015 without configuring Basic Auth on the server

When you want to publish build tasks to a TFS 2015 server, you need a Basic Authentication enabled endpoint. Unless your server is configured with SSL, this is a major security concern. Until now the guidance I received was to setup a second Application Tier, configure it with Basic Auth and configure it to only accept traffic from localhost. The sole purpose of that machine is then to upload build tasks and later probably extensions to a TFS 2015 server.

Today I found a neat little trick that removes this need. Fiddler to the rescue!

Start Fiddler and enable it's option to auto-authenticate:

Now open the command prompt and configure the proxy using an environment variable to instruct Node.js to use Fiddler as a proxy server, the default is port 8888:

C:>set http_proxy=

Then configure your account in tfx and force it to use basic auth:

C:>tfx login --auth-type basic --service-url http://jessehouwing:8080/tfs/DefaultCollection

You'll be prompted for a username and a password, it doesn't really matter what you enter, fiddler will handle the authentication for you in the background:

As long as Fiddler is running and configured to handle auth, you can use tfx against your TFS 2015 server.

Add additional fields to "Edit Test Case using Grid" option in VS Team Services

If you're bulk-creating, importing or editing test cases in Visual Studio Team Services, you're probably aware of the "Edit as Grid" option, which opens your test case in a spreadsheet like layout for bulk editing:

Not many people know that you can extend this grid easily to bulk-edit additional fields, like Area Path, Assigned To or any other field which exists on the Test Case work item.
To do so, open the Column Options:

Which will pop-up the column selection window where you can add additional fields from the Test Case work item. Add the buttons using the [>] button:

Now when you open the Grid View you'll notice that the additional columns are showing on the right side of the grid:

Specify these fields on the same line you're setting the Title of the Test Case and the field values will automatically be set:

Like what you see on Windows Spotlight? Save it!

Have you turned on Windows Spotlight in Windows 10? It's a new Lockscreen background every few days and so far I've been enjoying the pictures tremendously.

If you haven't tried Spotlight before, try turning it on:

In Windows 10 (1511) open the settings panel and navigate to Personalization and then Lock screen. Select Windows spotlight in the dropdown for Background. Scroll all the way down and hit Apply.

Now, whenever you see a picture you love, unlock your machine, hit [win]+r on your keyboard and paste the following location:


This will open up a folder with a bunch of files, each with a random file name. One of these files is your current lockscreen background. What I generally do is that I type cmd in the location bar of explorer en hit enter, this opens a commandline prompt in the current folder.

Then copy all the files to a temporary location and then rename them to *.jpg in one go:

C:UsersmeAppDataLocalPackagesMicrosoft.Windows.ContentDeliveryManager_cw5n1h2txyewyLocalStateAssets> copy *.* c:tempImages*.jpg

And then you can navigate to that folder, check the image preview in explorer and pick the backgrounds you like. Of most backgrounds you'll find both a portrait and a landscape version.

Mount OneDrive as a Network Drive

Ever wanted to upload a lot of data to OneDrive without having to sync that folder to your local machine (updating my music library is pretty hard, as to put data into the folder, I first need to sync it locally).

Ever wanted to download a few specific files from OneDrive without syncing them first?

Ever wanted to operate on your OneDrive files as if they were real local files?

That is all possible! The trick is to mount your OneDrive as a Network Drive. The trick is pretty simple and is explained here. The only thing I have to add to it is that if you're using 2-Factor Authentication (which you should), then you'll need to generate an app-specific password.