Peter Meinl
Peter Meinl

Reputation: 2586

How to reenable Application Insights in VS 2015

My VS 2015 shows a greyed out disable button for Application Insights (AI) under Extension and Updates. How can I enable AI?enter image description here

A long time ago I disabled AI in VS 2015. Because there is no enable button I tried uninstalling and reinstalling AI. Uninstall did remove AI from VS but it still showed up under Windows programs and features. Because I could not find an install option I did a VS repair which made AI show up in VS again but still with the grayed out disable button.

Maybe there is VS settings file I can use to bypass the VS UI.

[added Feb27, 2016] AI seems to be enabled OK on my VS 2015, the "disabled disable button" confused me.

To re-enable AI in my UWP app I:

Manually added three Nuget Packages: ApplicationInsights.WindowsApps, ApplicationInsights, ApplicationInsights.PersinstanceChannel. Confusingly the .WindowsApps V1.1.1 package description does not mention support for Win10 UWP, but it seems to be compatible.

Added Azure InstrumentationKey to ApplicationInsights.config. Added ApplicationInsights.WindowsAppInitializer.InitializeAsync(Metadata, Session, UnhandledException) to App constructor. Telemetry messages were shown in the VS output window but not reported to Azure. I expected session events. Added the PageView collector to InitializeAsync. Now events are reported to Azure.

Added AI command to VS menu. When clicked while app is running: shows green configure AI button. When clicked VS crashes. When clicked when app is stopped: shows search page OK.

Upvotes: 0

Views: 931

Answers (1)

John Gardner
John Gardner

Reputation: 25106

Are you sure it is actually disabled? I'm pretty sure that all of the extensions that are installed as machine wide have a disabled disable button, but i don't know why. (some don't have a disable button at all, just uninstall).

On my machine right now, I see the same thing, the button says "disable" and is disabled. If the extension was disabled, the button should say "enable".

The easiest way to find out if the extension is enabled there are several quick things to try:

  1. press CTRL+Q to get into the quick launch thing and type "application" - you should see entries for the AI toolbar and AI search tool.
  2. right click in the VS toolbar anywhere. you should see an "Application Insights" toolbar item right at the top (and it will be unchecked unless you are actively debugging).
  3. look in the "View" menu, "Other Windows" submenu, you should see "Application Insights Search" as an item there.

Upvotes: 1

Related Questions