I'd like to call some code from VSIX extension when visual studio loads a solution, how do I do that? Package::Initialize is called only when user presses a button of my addin first time.
vsix file by double-clicking the file or selecting the file and pressing Enter. After that, just follow the instructions. When the extension is installed, you can use the Manage Extensions dialog box to enable it, disable it, or uninstall it. Visual Studio Marketplace contains both VSIX and MSI extensions.
Steps: Open Developer Command Prompt for Visual Studio > type cd XXXX (replace XXXX with the path for example, for VS 2019 Community, C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE ) > press Enter > type VSIXInstaller.exe > press Enter > check if the extension has been installed.
A VSIX package is a . vsix file that contains one or more Visual Studio extensions, together with the metadata Visual Studio uses to classify and install the extensions. That metadata is contained in the VSIX manifest and the [Content_Types]. xml file.
Try adding the following attribute to your VSPackage class:
[ProvideAutoLoad(Microsoft.VisualStudio.Shell.Interop.UIContextGuids80.SolutionExists)]
That will trigger your package to load when a solution is opened/created.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With