mc89
mc89

Reputation: 13

solutionEvents.Opened is not getting fired in Visual Studio VSIX

I am developing an Extension for visual studio and "Solution Open" event need to be triggered once a solution is opened. Because I need to add a command to run when the solution opens.

For that I have used solutionEvents.Opened event handler and it is working fine when open solutions using below approaches

But strangely solutionEvents.Opened event handler is not working when open solutions using below approaches

I would like to know the reason behind that.

public void Initialize(Package package)
{
    solutionEvents.Opened += SolutionEvents_SolutionOpened;
}

Upvotes: 1

Views: 429

Answers (1)

Sergey Vlasov
Sergey Vlasov

Reputation: 27940

The solution might already have been loaded when your package initializes: https://github.com/madskristensen/SolutionLoadSample

Upvotes: 1

Related Questions