How to uninstall the "Microsoft Advertising SDK" Visual Studio extension?

Jeroen picture Jeroen · Jun 10, 2014 · Viewed 19.1k times · Source

One of the extensions listed in Visual Studio (2012 for me) is the "Microsoft Advertising SDK for Windows 8.1". I like to uninstall extensions I don't need, but this one won't allow me. if I hover the (enabled!) button it says in a tooltip:

This product cannot be uninstalled via extensions and updates

It looks like this:

extensions

On second inspection I see a similar (more helpful) message bottom right:

You need to use the Programs and Features pane in the Windows Control Panel to remove this extension.

Easy enough, no? But it's not there!

uninstalls

Or:

uninstalls search

In addition to the instructions on screen I also searched. The only helpful source was this MSDN page that says basically the same thing. Link is now broken.

Commenters mentioned that the extension web page (see "Reviews" and "Q AND A" tabs) has a few similar complaints. I've cross-posted this question there as well. Link is now broken, but if you search others are complaining still on the MSDN forums.

In any case: is there an easy way to uninstall this extension?

Answer

Duncan Smart picture Duncan Smart · Jun 27, 2014

Run the following from an elevated Powershell prompt:

gwmi Win32_Product -Filter "Name LIKE 'Microsoft Advertising%'"

And it should show the culprits:

IdentifyingNumber : {6AB13C21-C3EC-46E1-8009-6FD5EBEE515B}
Name              : Microsoft Advertising SDK for Windows 8.1 - ENU
Vendor            : Microsoft Corporation
Version           : 8.1.30809.0
Caption           : Microsoft Advertising SDK for Windows 8.1 - ENU

IdentifyingNumber : {6AC81125-8485-463D-9352-3F35A2508C11}
Name              : Microsoft Advertising SDK for Windows Phone 8.1 XAML - ENU
Vendor            : Microsoft Corporation
Version           : 8.1.40427.0
Caption           : Microsoft Advertising SDK for Windows Phone 8.1 XAML - ENU

IdentifyingNumber : {5C87A4DB-31C7-465E-9356-71B485B69EC8}
Name              : Microsoft Advertising SDK for Windows Phone - ENU
Vendor            : Microsoft Corporation
Version           : 6.2.960.0
Caption           : Microsoft Advertising SDK for Windows Phone - ENU

IdentifyingNumber : {EBD9DB6D-180B-4C59-9622-B75CC4B32C94}
Name              : Microsoft Advertising Service Extension for Visual Studio
Vendor            : Microsoft Corporation
Version           : 12.0.40402.0
Caption           : Microsoft Advertising Service Extension for Visual Studio

Then to actually uninstall add | foreach { $_.Uninstall() } to the command like so:

gwmi Win32_Product -Filter "Name LIKE 'Microsoft Advertising%'" | foreach { $_.Uninstall() }

Which should display for each one:

__GENUS          : 2
__CLASS          : __PARAMETERS
__SUPERCLASS     : 
__DYNASTY        : __PARAMETERS
__RELPATH        : 
__PROPERTY_COUNT : 1
__DERIVATION     : {}
__SERVER         : 
__NAMESPACE      : 
__PATH           : 
ReturnValue      : 0
PSComputerName   : 

The important thing to look for is ReturnValue : 0 which means success. If you get ReturnValue : 1603 it likely means your Powershell prompt wasn't elevated (running as admin). (Full list of ReturnValues documented here)