Dan Nolan
Dan Nolan

Reputation: 4772

Making tool window show automatically on VS load

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?

Upvotes: 3

Views: 534

Answers (1)

kernelman
kernelman

Reputation: 41

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.

Upvotes: 2

Related Questions