Skip to content
This repository was archived by the owner on Jun 21, 2023. It is now read-only.

Conversation

@jcansdale
Copy link
Collaborator

@jcansdale jcansdale commented Sep 30, 2019

GitHub for Visual Studio is currently broken on Visual Studio 2015, so I'd like this get this PR out ASAP!

Make sure that Microsoft.VisualStudio.Telemetry is only used on Visual Studio 2017 and above.

What this PR does

  • Factor out VisualStudioUsageTracker, an implementation of IUsageTracker that uses VS Telemetry
  • Add option to UsageTracker to use VS Telemetry
  • Only use VS Telemetry when running on Visual Studio 2017 and above

Reviewers

The aim of this PR was to factor out VisualStudioUsageTracker which can be selectively disabled in Visual Studio 2015. If we deprecate the GitHub telemetry in a future version, we can simply replace UsageTracker with VisualStudioUsageTracker. I've deliberately touched UsageTracker as little as possible because it's complex and I don't want to break anything!

I've tested this on Visual Studio 2015, 2017 and 2019 using the steps below.

How to test

Repro

  1. Open Visual Studio 2015
  2. Install GitHub for Visual Studio 2.10.6 from the Visual Studio Marketplace and Restart
    image
  3. Open Team Explorer - Connect
  4. Click on Manage Connections > Connect to GitHub
  5. Click on the GitHub tab (if GitHub Enterprise is selected)
  6. Click Sign in with your browser
  7. After authenticating return to Visual Studio
  8. Click on the GitHub tab (if GitHub Enterprise is selected)
  9. Expect the following error
    image

Fix

  1. Close all instances of Visual Studio and open GitHub.VisualStudio.vsix from this PR
    https://ci.appveyor.com/project/github-windows/visualstudio/builds/27765286/artifacts
  2. Install for and open Visual Studio 2015
  3. Open Team Explorer - Connect
  4. Click on Manage Connections > Connect to GitHub
  5. Click on the GitHub tab (if GitHub Enterprise is selected)
  6. Click Sign in with your browser
  7. Expect Connect to GitHub dialog to close

Fixes #2423

Microsoft.VisualStudio.Telemetry isn't available on VS 2015.
Make GitHubPackage responsible for enabling VS Telemetry on VS 2017 and
above.
@jcansdale jcansdale requested a review from alpaix September 30, 2019 12:23
@jcansdale jcansdale added the bug label Sep 30, 2019
@jcansdale jcansdale requested review from a user and StanleyGoldman September 30, 2019 14:09
Copy link
Contributor

@alpaix alpaix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jcansdale jcansdale merged commit 47dcf03 into master Sep 30, 2019
@jcansdale jcansdale deleted the fixes/telemetry-on-VS2015 branch September 30, 2019 22:31
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Telemetry is broken on Visual Studio 2015

3 participants