sajalverma17 / GitBranchDiffer

A Visual Studio Extension that displays source files Added/Modified/Renamed between a base branch you choose to diff against, and the current working branch in your Git repo. The diffed files are shown in the Solution Explorer using a Solution Explorer Filter
MIT License
6 stars 1 forks source link

Visual Studio 2022 Support #27

Closed WizX20 closed 2 years ago

WizX20 commented 2 years ago

Installed product versions

Description

Make the extension available in Visual Studio 2022.

Steps to recreate

  1. Download the extension installer.
  2. Run the installer.

Current behavior

Message that it is already installed to all applicable products appears even though it is not installed in Visual Studio 2022. It is also not listed in Online Extensions in Manage Extensions Visual Studio 2022.

Expected behavior

Installs and works in Visual Studio 2022.

Note: Have a look at the VS2022 CodeMaid Issue for some hints.

sajalverma17 commented 2 years ago

Thanks @WizX20 for opening the issue and hints on how to do it. I will get to it this week and test it on the Visual Studio 2022 Release Candidate.

sajalverma17 commented 2 years ago

Added support for VS2022 The PR is merged (with some Git history I messed up, just look at the last 13-ish commits which contain the actual upgrade work).

As guided by Microsoft Extensibility team, we build two different VSIX installers, one for VS2019 and one for VS2022. The latest CI build now outputs both the VSIXs, and I have attached the ZIP output of CI Build Version 1.0.3.39 below.

@WizX20 If you would like to, give the Alpha versions a test while I update the Publish workflow and create a new VS Marketplace Extension Page for VS2022 version of this plugin.

GitBranchDiffer.vsix - For VS2022 GitBranchDiffer2019.vsix - For VS2019

GitBranchDiffer-1.0.3.39.zip

WizX20 commented 2 years ago

Awesome! I will test the Alpha version the upcoming days and provide feedback.

WizX20 commented 2 years ago

I've installed the VS2022 version on Microsoft Visual Studio Enterprise 2022 (64-bit) - Preview, Version 17.1.0 Preview 1.1 But I do not see the button/commands in the solution explorer or the context-menu.

sajalverma17 commented 2 years ago

@WizX20 Strange, I don't think it should have been possible to install GitBranchDiffer.vsix to Microsoft Visual Studio Enterprise at all.

GitBranchDiffer only supports Community and Professional variants of of Visual Studio 2022. I just didn't think of Enterprise variant at all when making this plugin. I have the below two variants of VS2022, and the given VSIX files worked on BOTH of the VS2022 variants.

  1. Microsoft Visual Studio Community 2022 (64-bit) Version 17.1.0 Preview 1.1
  2. Microsoft Visual Studio Professional 2022 (64-bit) Version 17.0.1

I unfortunately don't have the ability to test the Enterprise edition of VS, but it should be easy to add support for it.

sajalverma17 commented 2 years ago

I added Visual Studio Enterprise edition as an Install Target for GitBranchDiffer2019 and 2022. So the plugin should now get installed to Visual Studio Community, Professional and Enterprise variants of both VS2019 and VS2022.

Below are the VSIXs from the latest CI Build (Version 1.0.3.42) attached in a ZIP:

GitBranchDiffer.vsix - For VS2022 GitBranchDiffer2019.vsix - For VS2019

GitBranchDiffer-1.0.3.42.zip

@WizX20 If the issue was just that plugin didn't support Enterprise variants, this should solve it. If not, could you attach the Install Log that gets generated when installing the VSIXs?

image

WizX20 commented 2 years ago

Hi, I installed the VS2022 version, but then I had two 😅 So after that I removed both GitBranchDiffer v1.0.3.39 and GitBranchDiffer v1.0.3.42.

After that I installed GitBranchDiffer v1.0.3.42 again.

image

dd_VSIXInstaller_20211202172743_9a94.log

Starting Visual Studio gave me the following messages: image image ActivityLog.xml.txt

Options are present: image

sajalverma17 commented 2 years ago

Hi @WizX20 Thanks for the feedback. Sorry for a delay in my response, I am on a vacation for this whole month.

First of all, I think you had both the versions installed at the same time because I changed the product ID of the plugin between the CI builds I gave you. Shouldn't be an issue now.

Regarding the errors, I didn't find anything wrong in the installation logs you attached, but this might be something internal to VS package installation process that I can't relate to my plugin.

Might I suggest some more troubleshooting by running below in VS2022 Developer Command Shell?

devenv.exe /clearcache
devenv /updateconfiguration

I also found others running into similar errors with Microsoft.VisualStudio.Composition as you are running into with the RoslynPackage. And the most common fix is to clear the ComponentModelCache here:

%localappdata%\Microsoft\VisualStudio\17_xxxx\ComponentModelCache

PS. I installed VS 2022 Enterprise edition myself (not the preview, but the final release). I then installed from the latest released version I created here and found no issues with all the three editions of VS I have added support for VS2022 (Pro, Community, Enterprise)

Edit: If you can, could you try out the 2019 VSIX and see if nothing broke in VS2019? Thanks 🙂

sajalverma17 commented 2 years ago

While VS2022's latest update (v17.2) will come with a Git Branch Comparison, I still released support for VS2022 since I already added that. ¯_(ツ)_/¯

Page for VS2022 version of the extension: https://marketplace.visualstudio.com/items?itemName=SajalVerma.GitBranchDifferDev17