Question

In my Visual Studio extensibility project, I'm attempting to make my tool window visible upon launch after package installation.

The dotneteers describe a way of doing this that involves adding the following line to the package header (i.e. MyPackage.VSPackage.cs):

[ProvideToolWindowVisibility(typeof(MyToolWindow), Microsoft.VisualStudio.Shell.Interop.UIContextGuids80.NoSolution)]

Unfortunately, this doesn't work. It seems that Visual Studio doesn't pay attention to the "NoSolution" tool visibility directive (I can confirm that it does work for some of the other enumeration items, like Debugging, but this doesn't fit my use case).

If there's no way to make this auto-show the tool window on VS load, has anyone come up with any alternate (i.e. novel :)) solutions?

Était-ce utile?

La solution

Alternatively, you can try making you package as auto load using ProvideAutoLoad and once at the Initialize() try to create this tool window. Use the Package.FindToolWindow() method.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top