yysun / git-tools

This extension provides a git changes tool window, a graphical git history viewer and menus to launch Git Bash, Git Extenstions and TortoiseGit.
http://yysun.github.com/git-tools
MIT License
78 stars 27 forks source link

Fixed VS2022 Support #41

Closed NightOwl888 closed 1 year ago

NightOwl888 commented 1 year ago

Fixes #40.

This is built off of the https://github.com/yysun/git-tools/tree/VS2022 branch and also targets that branch.

I ended up rebuilding the whole project piece by piece from a working menu command demo, so I don't know all of the contributing factors that were causing it not to appear. But this PR:

  1. Removes an unnecessary dependency on WindowsBase.dll from GitApi
  2. Changed UseCodeBase to true - the menu disappeared when it was false
  3. Changed System.ComponentModel.Composition to the NuGet package instead of GAC
  4. Adds missing dependency on Microsoft.VisualStudio.MefComponent (which only seems to have fixed the colorization of the Git Diff window)

Performance is still an issue, but I tested a release build and it doesn't seem to be any worse than the VS2019 version. I suspect there are many performance issues that could be resolved by changing it to use LibGit2Sharp instead of System.Diagnostics.Process to run the git commands, using await, and not performing scans so frequently (or at least an option to disable it and use the refresh button manually).

On a large project, the scans interfere with the Commit button and it sometimes takes 10-15 clicks on it before it will take. The scans also interfere with trying to rewrite commit history.

At least this gets us off of VS2019, which has been out of support since April, 2022. Please roll a release ASAP.

NightOwl888 commented 1 year ago

FYI - There is a helpful VS2022 extension upgrade guide here.

yysun commented 1 year ago

Thank you very much.

On Sat, Nov 12, 2022 at 4:57 AM Shad Storhaug @.***> wrote:

FYI - There is a helpful VS2022 extension upgrade guide here https://learn.microsoft.com/en-us/visualstudio/extensibility/migration/update-visual-studio-extension?view=vs-2022 .

— Reply to this email directly, view it on GitHub https://github.com/yysun/git-tools/pull/41#issuecomment-1312442762, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABJUM7S7KXO3YPNL3LLMZDWH5SXZANCNFSM6AAAAAAR5V46NQ . You are receiving this because you modified the open/close state.Message ID: @.***>

NightOwl888 commented 1 year ago

You're welcome.

I just realized I forgot to add the metadata to target other editions of Visual Studio 2022. It only included support for Visual Studio 2022 Community Edition.

yysun commented 1 year ago

I have added other editions in the published version.

On Sat, Nov 12, 2022 at 10:09 AM Shad Storhaug @.***> wrote:

You're welcome.

I just realized I forgot to add the metadata to target other editions of Visual Studio 2022. It only included support for Visual Studio 2022 Community Edition.

— Reply to this email directly, view it on GitHub https://github.com/yysun/git-tools/pull/41#issuecomment-1312502249, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABJUMZOGANZ5OTX3T43GC3WH6XJNANCNFSM6AAAAAAR5V46NQ . You are receiving this because you modified the open/close state.Message ID: @.***>