markrendle / nogit

Disable Git SCC plug-in in Visual Studio 2013 to 2017
https://visualstudiogallery.msdn.microsoft.com/146b404a-3c91-46ff-932a-fb0f8b826f94
MIT License
15 stars 10 forks source link

Visual Studio 2019 support #8

Open mvonballmo opened 5 years ago

mvonballmo commented 5 years ago

What are the chances we can get an update for VS2019?

The behavior in VS2019 is the same as VS2017: Visual Studio keeps turning Git support back on, even though I don't want it and it needlessly wastes CPU and memory.

Thanks in advance for any help you can offer.

Memphizzz commented 5 years ago

+1 this would be great!

mvonballmo commented 5 years ago

Any news on this?

For a little while, I thought we didn't need NoGit anymore because VS2019 wasn't re-enabling SC integration the way its predecessors did, but now it's started again.

andresrsanchez commented 5 years ago

Hi!

I think that the problem with this issue is the backward compatibility, i mean:

In VS 2019 if you don't update your extension to inherit from AsyncPackage you will receive a message like 'One or more extensions were loaded using deprecated APIs', so if you inherit from it i don't know the behavior of NoGit in vs previous to 2015 version.

The recommended minor version to support is Visual Studio 2015 (14.0), so my choice is drop the support for earlier versions of vs, update to support [14.0, 17.0), drop the dependency on Microsoft.VisualStudio.MPF and inherit from AsyncPackage.

I actually did an implementation of it and it's pretty straightforward, let's see the opinion of @markrendle

markrendle commented 5 years ago

Hi. I had a go at this with 2019.1 and turning off the source control provider forcibly closed the solution. I will have another look with the latest version, but I fear Microsoft may have killed this.

mvonballmo commented 5 years ago

Thanks to all for looking into it. I feared as much that source control would no longer be optional. Here's hoping it uses less memory than before.

robertoandrade commented 4 years ago

The following gist worked for me, wondering if it can just be wrapped in this extension and simply persist the file upon installation of the extension or if all code needs to run AFTER VS starts?

robertoandrade commented 4 years ago

Spoke too soon :( VS 2019 reenabled the freaking Git plugin again after running it for a few minutes with the solution open.

robertoandrade commented 4 years ago

Ok, so this other solution has been working for me: http://blog.davidjs.com/2014/01/speed-up-visual-studio-by-disabling-sourcecontrol-plugin/

Had to close the solution but every time I reopen it or restart VS 2019 it persists as off, so works like expected?

augustoproiete commented 4 years ago

@robertoandrade, let us know if this value remains persisted as off:

AFAIK these are some of the common scenarios where VS would enable the Git extension again...

robertoandrade commented 4 years ago

Just upgraded to the latest revision of VS 2019 and settings still persist ;)

On Mon, Oct 14, 2019 at 5:55 PM Caio Proiete notifications@github.com wrote:

@robertoandrade https://github.com/robertoandrade, let us know if this value remains persisted as off:

  • If you close Visual Studio, delete the .vs folder, and re-open the solution
  • The next time you update Visual Studio

AFAIK these are some of the common scenarios where VS would enable the Git extension again...

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/markrendle/nogit/issues/8?email_source=notifications&email_token=AACN36IEULKLYKIXJSRJZHTQOTMCHA5CNFSM4HDWTRQ2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEBGPWVA#issuecomment-541915988, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACN36LQKNYY4VHCKSCMRCLQOTMCHANCNFSM4HDWTRQQ .

Anlo2846 commented 4 years ago

I'm also having problems with Git in Visual Studio 2019 but I think I finally have found a working solution. Until now I have used the trick of renaming the .git folder to _git and adding a textfile named .git containing the line "gitdir: _git". But since upgrading to VS2019 that doesn't work anymore.

I have tried lots of different solutions, but none have worked since I need Git for some projects and not for others. My problem project is using my company's Team Foundation Server for source control. But since I've lost code in bad merges made by TFS, I'm committing my changes to a local Git repo before updating or committing to TFS.

D:\Projects\TFS\.git Local git repo that VS shouldn't use.

D:\Projects\TFS\ProjectA\$tf TFS files that VS should use for ProjectA.

No matter how I tried, I could not get VS to use TFS for ProjectA when it found a .git folder in a parent folder. My solution is to move the .git folder to:

D:\Projects\TFS-GIT\.git

and create a directory junction to the ProjectA folder. Start an elevated command prompt and run:

mklink /J D:\Projects\TFS-GIT\ProjectA D:\Projects\TFS\ProjectA

Opening the D:\Projects\TFS\ProjectA\ProjectA.sln in Visual Studio, it won't find any .git folder and will connect to TFS like it should.

Running git commands from D:\Projects\TFS-GIT will use the same files as Visual Studio except that the .git folder is also available. TortoiseGit also works fine from this folder.

carlbm commented 4 years ago

Thank you @Anlo2846 - this is a bit of work to get going, but the difference is clear. VS hasn't slowed down or crashed since I've put it in place. 👍 I still can't understand why VS doesn't allow us to just disable the teams plugin, but at least we now have a workaround for 2019

VAllens commented 3 years ago

In the VS 2019 v16.8.2, the NO option is in effect. It seems that we no longer need NoGit. 👍