Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Git Tools for Visual Studio 2022 #40

Open
Dacke opened this issue Nov 19, 2021 · 13 comments
Open

Git Tools for Visual Studio 2022 #40

Dacke opened this issue Nov 19, 2021 · 13 comments

Comments

@Dacke
Copy link

Dacke commented Nov 19, 2021

Please let me know when you will have this code migrated for Visual Studio 2022 so that it can be installed.

@NightOwl888
Copy link
Contributor

@yysun

Any chance this can be upgraded to VS 2022 soon? We are blocked from upgrading to VS 2022 because this tool is so crucial to our workflow. But that also means we are testing .NET 6 on a pre-release version because the production SDKs are not supported on VS 2019 (and .NET 5 is just 7 weeks away from end of support).

@yysun
Copy link
Owner

yysun commented Mar 21, 2022 via email

@NightOwl888
Copy link
Contributor

FYI - VS2019 now shows a message indicating it is no longer supported.

image

@yysun
Copy link
Owner

yysun commented Apr 15, 2022

I was able to compile and see the extension installed in VS2022, but nowhere to find my menus or tool bar. It might be because VS2022 has its own 'Git Changes' tool window that causes conflict. However, I found the VS2022's built-in 'Git Changes' is remarkably similar to my extension (see screenshot below). I am wondering now do I need to continue to migrate this extension to VS2022?

image

@NightOwl888
Copy link
Contributor

Yes, I noticed they did that.

However, the performance of that window is unacceptably slow. It takes around 3-4 seconds just to display 1 file and there is no easy way to switch between files for review.

The Git Tools window takes less than a second to load and I can use the up and down arrows on the keyboard to quickly switch between files.

I often have a few dozen files that are being edited at a time, and I use Git Tools to preview the changes prior to checking them in. If there are a lot of files, I will use the down arrow key to switch between files to review them. Usually, I will quickly shift back and forth between files to determine which ones I will add to a commit. AFAIK, there is no way to do that in VS2022 and the 3-4 second delay just to view the changes in a file will turn a 45 minute review/commit into several hours.

Of course, I review the changes again in GitHub's preview window again after they are committed, but being able to catch things before they are committed saves a lot of time.

@Dacke
Copy link
Author

Dacke commented Sep 1, 2022

I too tried using the Microsoft tool, but found that I liked yours better. Especially the visualization that you've done.

@NightOwl888
Copy link
Contributor

NightOwl888 commented Nov 8, 2022

@yysun - Now that .NET 7 is out, we have a framework to support that won't even build in VS 2019, yet I am stuck on VS 2019 until this can be upgraded or I have a realistic alternative.

Any chance you can look into the menu issue and release this for VS 2022?

@NightOwl888
Copy link
Contributor

@Dacke, @yysun - I have fixed the menu issue in #41. Here is a copy of the VS2022 VSIX that can be used until there is an official release.

VSIXProject2022.zip

@asine
Copy link
Contributor

asine commented Nov 14, 2022

click "git changes",show error :
SetSite failed for package [MyPackage]Source: GitApi2 Description: Git Executable not found

@NightOwl888
Copy link
Contributor

@asine

Looks like the paths are all defaulted:

if (string.IsNullOrEmpty(GitBashPath))
{
GitBashPath = TryFindFile(new string[]{
@"C:\Program Files\Git\bin\git.exe",
@"C:\Program Files (x86)\Git\bin\git.exe",
});
}
if (string.IsNullOrEmpty(GitExtensionPath))
{
GitExtensionPath = TryFindFile(new string[]{
@"C:\Program Files\GitExtensions\GitExtensions.exe",
@"C:\Program Files (x86)\GitExtensions\GitExtensions.exe",
});
}
if (string.IsNullOrEmpty(TortoiseGitPath))
{
TortoiseGitPath = TryFindFile(new string[]{
@"C:\Program Files\TortoiseGit\bin\TortoiseGitProc.exe",
@"C:\Program Files (x86)\TortoiseGit\bin\TortoiseGitProc.exe",
});
}

I am not sure how you would override these, but if you can't the quick fix is to ensure Git is installed in the right location so it can be found.

@NightOwl888
Copy link
Contributor

The default settings also obviously won't work on a Mac.

@asine
Copy link
Contributor

asine commented Nov 15, 2022

I debug it,can change file "GitSccOptions" at line 29:private static GitSccOptions gitSccOptions; change to private static GitSccOptions gitSccOptions = null;
then 1. click menu "git changes" will show git change window.
2. git tools will read config from file "gitscc.config". so,can override pre set path in the file,and resovle my problem. @yysun

@jzoss
Copy link
Collaborator

jzoss commented Nov 15, 2022

I am going to run some tests, and if they pass I will make a new release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants