0

Based on this answer, I added keys to Visual Studio 2017 and it worked just fine. But it doesn't work for Visual Studio 2019.

Here's what I do:

  1. I create a new project, using VSIX project template
  2. I add a .pkgdef file to it, and I populate it using these lines: [$RootKey$\TeamFoundation\SourceControl\Checkin Policies] "ExampleKey"="ExampleValue"
  3. I modify source.extension.vsixmanifest file and add assemblies and packages to it (based on that answer, and just like VS2017)
  4. I make sure my extension is unsintalled (VS2019 => Extension => Manage Extensions => Selecting my extension => Uninstall => Closing VS2019)
  5. Then I make sure the ExampleKey ExampleValue is not present in privateregistry.bin. (Opening regedit.exe, selecting HKEY_LOCAL_MACHINE => File => Load hive => %localappdata%\Microsoft\VisualStudio\16.0_e880ebae\privateregistry.bin as VS2019Registry, then selecting VS2019Registry\Software\Microsoft\VisualStudio\16.0_e880ebae_Config\TeamFoundation\SourceControl\Checkin Policies)
  6. Then I unload the VS2019Registry hive.
  7. Then I double click my extension, and install it on VS2019
  8. Then I open VS2019 to make sure my extension is installed, and it's in the list of extensions.
  9. Then I close VS2019, and reopen private registry, but my key is not added to the intended path.

What should I do? How can I debug it? The exact same path was working for VS2017.

  • Why not just manually add your keys in step 5? – Sergey Vlasov Aug 09 '19 at 04:00
  • Because that's counterproductive for a large software team, with fully automated QA infrastructure. – mohammad rostami siahgeli Aug 10 '19 at 08:45
  • I've done this before with a .pkgdef. How exactly did you edit the .vsixmanifest to include the .pkgdef file? With similar entries in my TFSPolicies.pgkdef file, I added the following tag to my .vsixmanifest to include the .pkgdef as an asset: – Ed Dore Aug 20 '19 at 16:25

0 Answers0