I've just upgraded Visual Studio from 2019 to 2022 and of course a few extensions are missing again. Always the same trouble with upgrades. So I found a similar extension that already does half the work but it has no source code and the author is anonymous. I had no other choice but to disassemble its code and recreate it as a new VS extension. But something's missing that ILSpy didn't get.
The original extension is: https://marketplace.visualstudio.com/items?itemName=EngineDesigns.CollapseAllRegions
It can collapse regions but not expand them. It works by pressing the Ctrl+M, Ctrl+R hotkey.
The old extension is: https://marketplace.visualstudio.com/items?itemName=VladH.CollapseRegionExtension
It can collapse and expand regions as two separate commands with Ctrl+R, Ctrl+NumPlus and Ctrl+R, Ctrl+NumMinus. These hotkeys should be customisable in Visual Studio by the user. The source code is too old to be upgraded and the author doesn't respond anymore. So this code is probably lost and cannot be used anymore.
I disassembled the DLL of the first extension and pasted it into a new VSIX project. It's not much. It does compile but the features are not visible in the experimental instance. I guess it's because there's no code that defines the keyboard hotkeys.
I couldn't find any information about how to do that. Can anybody please explain it to me? What should I do to expose the command as a user keyboard hotkey? VS extension development is always a nightmare, way too complicated and no real documentation. And then these constant changes that break most addons. Not even Mozilla is so terrible, and they broke a lot in the past.
Oh, if somebody can make Microsoft implement this feature directly in Visual Studio and keep it there, that would be the best option. But Microsoft doesn't respond either.