Quantcast
Channel: Visual Studio Integrate forum
Viewing all articles
Browse latest Browse all 4410

Detecting a project upgrade

$
0
0

We need to do some processing on loaded C++ and C# projects after the solution is fully loaded.  Most of the time, handling IVsSolutionEvents3.OnAfterOpenSolution works fine.  However, if the solution being opened requires an upgrade, say because we're opening a VS2008 project in Dev14+, then the OnAfterOpenSolution method is called before the upgrade is performed.   This leaves the solution in a state where many calls to IVsSolution (such as ReloadProject) will not work.  So, we register for IVsSolutionEventsProjectUpgrade and field the OnAfterUpgradeProject method.

The question is how to detect in our OnAfterOpenSolution method whether any project in the solution is about to be upgraded so that we know to defer processing until OnAfterUpgradeProject (which seems to always be called after OnAfterOpenSolution).  I've poked around for various IVsSolution and IVsHierarchy propid's and not come across anything.  Any assistance in figuring out how to know to defer processing within the OnAfterOpenSolution method (or some other technique), would very much be appreciated.

Thanks in advance


Kirk Fertitta


Viewing all articles
Browse latest Browse all 4410

Trending Articles