gitextensions / gitextensions.vsix

Visual Studio extensions for Git Extensions
MIT License
16 stars 8 forks source link

VS2017 VSIX duplicated icons #8

Open RussKie opened 6 years ago

RussKie commented 6 years ago

Do you want to request a feature or report a bug? bug

What is the current behavior?

  1. Check that VS2017 doesn't have GE visx installed: image

  2. Install vsix image image

  3. Verify that GE is installed in VS2017 image

  4. Observe it has duplicated icons image

After resetting the toolbar everything is good.

What is the expected behavior? No duplicates once installed

Environment you encounter the issue:

RussKie commented 6 years ago

I tried running Setup\RemoveVSAddInCommands.vbs few times with no observable changes. I added the following to the script:

' Custom action to remove the commands of Visual Studio 2017 when uninstalling the add-in
Function RemoveVS2017AddInCommands
    On Error Resume Next
    RemoveVSAddInCommands("15.0")
    RemoveVS2017AddInCommands = msiDoActionStatusSuccess
End Function

call RemoveVS2017AddInCommands

If I enable errors the script fails on the following line:

    For Each cmdBar In dte.CommandBars
        If cmdBar.Name = "GitExtensions" Then
            dte.Commands.RemoveCommandBar(cmdBar) ' << fails here
        End If
    Next

with the following exception:

> RemoveVSAddInCommands.vbs(22, 13) Microsoft.VisualStudio.Shell.UI.Internal: A built-in command bar cannot be deleted.

Either way the toolbar is still in VS2017 and had the duplicated icons until I reset the toolbar manually...

RussKie commented 6 years ago

Another interesting twist:

I had two instances of VS2017 running. In one instance I uninstalled the VSIX and closed it (the other instance was running). VS said the VSIX would be uninstalled when all VS windows closed). I then started a new instance and the VSIX had all buttons duplicated again....

image

RussKie commented 6 years ago

Having uninstalled the VSIX, I've run the script again. This time the script ran without any errors. Installed the VSIX again and the toolbar had all icons duplicated again....

image

eaembree commented 6 years ago

I am experiencing the icon duplication issue and can also consistently cause repetitive icon duplication as in the images below: image image image

This is using the VSIX installer released a few days ago, Nov 10, on the marketplace. The key seems to be whether or not the git extensions toolbar was visible when you last closed visual studio.

Steps to repeat:

  1. Install the extension
  2. Run VS. GitExtensions toolbar may or may not show in my experience. If not open, right click the toolbar and check to show the GitExtensions toolbar. At this point, whether you had to show it manually or not, you should have duplicated icons.
  3. Right click in the toolbar and uncheck the GitExtensions toolbar.
  4. Close VS
  5. Open VS, right click the toolbar, and check to show the GitExtensions toolbar. You should now have four sets of icons.
  6. Repeat steps 3-5 and you should have eight sets of icons.

At any point if you close VS while still showing the toolbar then you will still have the extra icons when opening VS again but they have been sorted: image

Manually resetting the toolbar works but drops the text on the commit button. image

The text on the commit button is typically restored on closing and opening VS again but not always. Sometimes you can get the text back by deliberately forcing duplicate icons and resetting again but even that is not a sure thing. You may have to repeat several times to get it back (and it will take a moment to show when it does). If you do get a single set of icons working be sure to not stop showing the toolbar or you go right back to step 2 from above.

RussKie commented 6 years ago

Wow you have a severe outbreak of icon duplications....

After I reset the toolbar everything works as expected image

Immediately after the reset the text on the commit button was gone, but after a restart it came back and I haven't had any issues since. I've tested it on 3 different computers (W8, W8.1 and W10).

itsho commented 4 years ago

I guess that it's the same issue, but when I switch between branches, only the first button is referring to the correct one: multipleCommitButtons

also, the easiest way to reproduce the bug is to open two instances of Visual Studio (at least on my machine - GitExt 3.3.1.7897, VS2019 16.4.2, Win10 1909)

KamranShahid commented 3 years ago

Same happening for me after i installed VS 2019 on a fresh machine. Even reset not working. Any idea what should i do for VS 2019?

TrickUK commented 3 years ago

image This is recurring for me too recently, having been fine for ages. VS 2019 Version 16.11.2

TrickUK commented 3 years ago

Actually, just realised a reset appears to have sorted this for me at least; will post if it happens again.