choco icon indicating copy to clipboard operation
choco copied to clipboard

Add uninstall PowerShell helper for VSIX (visual studio extension)

Open timabell opened this issue 10 years ago • 6 comments

Hi, hope you don't mind me asking here. I'm trying to create a package for a visual studio extension (vsix). I've got the install working; now I am wondering about allowing uninstall, it would be nice if I could provide that but there doesn't seem to provision for it.

I was following the instructions at https://github.com/chocolatey/choco/wiki/HelpersInstallChocolateyVsixPackage but can't find an equivalent uninstall command.

C:\Program Files (x86)\Microsoft Visual Studio 14.0>vsixinstaller /? does show an uninstall switch.

I assume it's just not implemented? Cheers

Thanks for a great tool.

timabell avatar Aug 22 '15 22:08 timabell

@timabell You are correct, an uninstall helper just has not been added. If you want to add one, we accept pull requests. Just make sure you read over our Contributing doc prior to ensure you set up commits correctly and can sign the CLA. :)

ferventcoder avatar Aug 23 '15 01:08 ferventcoder

Okay thanks for confirming. I'll pass on the PR then as I'm not keen on CLAs.

timabell avatar Aug 23 '15 01:08 timabell

No worries.

ferventcoder avatar Aug 23 '15 15:08 ferventcoder

I was going to look into this one. At first glance, it looks like the uninstall and install will have very similar code (i.e. like locating VS Install directory).

  • Would creating another function like Get-VisualStudioInstallDir or Get-VisualStudioVersion be okay to add as a helper function as well?
  • Also, are there any powershell unit tests or integration tests that should be included (I see C#, but no powershell)?

kevindaub avatar Aug 30 '15 02:08 kevindaub

C# integration tests are in for testing different behaviors of packages, installing and uninstalling, but don't actually test making changes to the system itself. I've been thinking about how to introduce those kinds of tests without having to change system state. You are welcome to make suggestions.

All of the PowerShell functions will be reimplemented as C# PowerShell cmdlets at some point, so something else to consider.

ferventcoder avatar Aug 30 '15 03:08 ferventcoder

I'd prefer to keep in C#, so maybe that's the path I'll go down. It also allows easier testing.

kevindaub avatar Aug 30 '15 15:08 kevindaub