Bug 52637 - [Intentional behavior] Cycle 8 and higher leaves behind extensions directories for Merq.Vsix and Xamarin.Forms.Templates.VisualStudio after uninstall
Summary: [Intentional behavior] Cycle 8 and higher leaves behind extensions directorie...
Status: RESOLVED FEATURE
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: Installer ()
Version: 4.3.0 (C9)
Hardware: PC Windows
: --- minor
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2017-02-21 00:20 UTC by Brendan Zagaeski (Xamarin Team, assistant)
Modified: 2017-02-21 00:20 UTC (History)
3 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FEATURE

Description Brendan Zagaeski (Xamarin Team, assistant) 2017-02-21 00:20:33 UTC
[Intentional behavior] Cycle 8 and higher leaves behind extensions directories for Merq.Vsix and Xamarin.Forms.Templates.VisualStudio after uninstall

I am filing and directly resolving this bug to document an interesting behavior of VSIX extensions in Visual Studio: uninstalling a VSIX extension from Visual Studio does not delete the corresponding folder from "Common7\IDE\Extensions".  Instead it just appends ".deleteme" to some of the file names.

I didn't see any authoritative explanation about .deleteme files in my quick internet searches, so I am filing this informational report in case it might save time for someone else who notices the same behavior.  The quick summary is that the uninstall behavior of the VSIXs in the Xamarin installer does indeed match the expected uninstall behavior of other VSIX extensions.




## Steps followed to test


1. Start with a clean Windows system with VS 2015 Update 3 that has never had Xamarin installed.


2. Run the following command in PowerShell to gather the original list of file sizes and names in the VS extensions folder:

gci -r -Force "C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions" | Where-Object { $_ -is [IO.FileInfo] } | Select -Property Length,FullName | Format-Table -AutoSize | Out-File -Width 512 "$Env:USERPROFILE\Desktop\Before.txt"


3. Install the desired version of Xamarin for Visual Studio via the .msi installer.  Or for comparison install "Extensibility Tools" [1] via "Tools > Extensions and Updates > Online > Visual Studio Gallery > Search Visual Studio Gallery > Extensibility Tools".


4. Quit Visual Studio if it's open.


5. (Optional) Run `devenv /setup` in a developer command prompt with administrative privileges.  (This step is probably redundant for this particular scenario.  It is only included here for extra care in data gathering.)


6. Run Visual Studio and open the "File > New > Project" dialog to ensure that any new templates get configured.


7. Collect the new list of files from the VS extensions folder:

gci -r -Force "C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions" | Where-Object { $_ -is [IO.FileInfo] } | Select -Property Length,FullName | Format-Table -AutoSize | Out-File -Width 512 "$Env:USERPROFILE\Desktop\AfterInstall.txt"


8. Use the "Programs and Features" control panel to uninstall the "Xamarin" package.  Or for the comparison case, use the "Tools > Extensions and Updates > Installed > All" window in VS to uninstall the "Extensibility Tools" extension.


9. Repeat steps 4-6 to ensure Visual Studio has completed any changes.


10. Run the PowerShell command again to gather the final list of files:

gci -r -Force "C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions" | Where-Object { $_ -is [IO.FileInfo] } | Select -Property Length,FullName | Format-Table -AutoSize | Out-File -Width 512 "$Env:USERPROFILE\Desktop\AfterUninstall.txt"



[1] https://marketplace.visualstudio.com/items?itemName=MadsKristensen.ExtensibilityTools




## Results with Xamarin (Cycle 9, 4.3.0.781 (6714407))



### Changes after the installation (step 7)

2315 files are added to the main, non-VSIX "Xamarin" extension folder.

1673 files total are added to the VSIX extension folders for Merq.Vsix, Mono.Debugging.VisualStudio.Vsix, and Xamarin.Forms.Templates.VisualStudio.


### Changes after the uninstallation (step 10)

Although the main, non-VSIX "Xamarin" extension folder _is_ deleted, no files within the VSIX extension folders are deleted or change size.  The only change in those directories is that several of the files are renamed to append the ".deleteme" extension:


>    Length FullName
>    ------ --------
> -    1136 C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\ba5mwv1q.jym\BindingRedirects.pkgdef
> +    1136 C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\ba5mwv1q.jym\BindingRedirects.pkgdef.deleteme
> -    1328 C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\ba5mwv1q.jym\extension.vsixmanifest
> +    1328 C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\ba5mwv1q.jym\extension.vsixmanifest.deleteme
> -    3342 C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\ba5mwv1q.jym\Merq.Vsix.pkgdef
> +    3342 C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\ba5mwv1q.jym\Merq.Vsix.pkgdef.deleteme
> -    1102 C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\eblvfbqk.pk1\extension.vsixmanifest
> +    1102 C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\eblvfbqk.pk1\extension.vsixmanifest.deleteme
> -    4872 C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\eblvfbqk.pk1\Mono.Debugging.VisualStudio.Vsix.pkgdef
> +    4872 C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\eblvfbqk.pk1\Mono.Debugging.VisualStudio.Vsix.pkgdef.deleteme
> -    1329 C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\j0m5m1lo.syx\extension.vsixmanifest
> +    1329 C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\j0m5m1lo.syx\extension.vsixmanifest.deleteme
> -     538 C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\j0m5m1lo.syx\Xamarin.Forms.Templates.VisualStudio.pkgdef
> +     538 C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\j0m5m1lo.syx\Xamarin.Forms.Templates.VisualStudio.pkgdef.deleteme



## Results with the Extensibility Tools extension (version 1.10.188) for comparison



### Changes after the installation (step 7)

79 files are added, all within the new subdirectory that corresponds to the Extensibility Tools extension ("Extensions\j0npiqej.52p" in my exact test).



### Changes after the uninstallation (step 10)

No files are deleted or change size.  The only change is that several of the files are renamed to append the ".deleteme" extension:

>    Length FullName
>    ------ --------
> -    2056 C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\j0npiqej.52p\extension.vsixmanifest
> +    2056 C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\j0npiqej.52p\extension.vsixmanifest.deleteme
> -    7106 C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\j0npiqej.52p\ExtensibilityTools.pkgdef
> +    7106 C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\j0npiqej.52p\ExtensibilityTools.pkgdef.deleteme
> -     101 C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\j0npiqej.52p\ImageManifest\icon.pkgdef
> +     101 C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\j0npiqej.52p\ImageManifest\icon.pkgdef.deleteme
> -     114 C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\j0npiqej.52p\VSCT\Snippets\snippets.pkgdef
> +     114 C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\j0npiqej.52p\VSCT\Snippets\snippets.pkgdef.deleteme



## Testing environment info (brief)

Microsoft Visual Studio Enterprise 2015
Version 14.0.25431.01 Update 3

Windows 10 (64-bit) Version 1607 (OS Build 14393.0)
US English locale, US Eastern time zone