Skip to content

Commit

Permalink
Handle GetIntellisenseProjectName returning empty
Browse files Browse the repository at this point in the history
CPS-based projects have moved from a "fake" IVsHierarchy being passed to the Roslyn to returning the "real" hiearchy representing the project. This results in GetItemContext actually returning a real implementation of "IWebApplicationCtxSvc" instead of previously failing.

This implementation returns S_OK and an "empty" project name - to indicate that it doesn't actually handle the call (with a giant TODO). Handle that situation and treated it as failed, so that we proceed onto IVsContainedLanguageProjectNameProvider which provides the real underlying value.

This is blocking dotnet/project-system#4419.
  • Loading branch information
davkean committed Jan 4, 2019
1 parent 2b2f240 commit 057904d
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ private VisualStudioProject FindMatchingProject(IVsHierarchy hierarchy, uint ite
}
}

if (projectName == null)
if (string.IsNullOrEmpty(projectName))
{
if (hierarchy is IVsContainedLanguageProjectNameProvider containedLanguageProjectNameProvider)
{
Expand Down

0 comments on commit 057904d

Please sign in to comment.