A recent change (most likely commit 7d555d2) in the Solution Item class has caused a negative side effect:
When VS is opened and a solution is passed through the command line then when you enumerate the solution and its children then the solution explorer will show an error message:
Apparently the solution explorer is in some state then which does not allow generating correct Hierarchy Items or something like that.
I have adjusted my code to check if the solution explorer can be accessed before enumerating the projects.
try
{
var solwin = await VS.Windows.GetSolutionExplorerWindowAsync();
enumProjects = solwin != null;
}
catch ( Exception)
{
// This happens when the solution explorer is not visible yet
// do not enum the projects then
enumProjects = false;
}
if (enumProjects)
.
.
That solves the problem for me. I am not sure what exactly causes the problem, maybe someone else does ?
A recent change (most likely commit 7d555d2) in the Solution Item class has caused a negative side effect: When VS is opened and a solution is passed through the command line then when you enumerate the solution and its children then the solution explorer will show an error message:
Apparently the solution explorer is in some state then which does not allow generating correct Hierarchy Items or something like that.
I have adjusted my code to check if the solution explorer can be accessed before enumerating the projects.
That solves the problem for me. I am not sure what exactly causes the problem, maybe someone else does ?