Skip to content
This repository has been archived by the owner on May 17, 2024. It is now read-only.

Commit

Permalink
In default case, only fail if there are project type guids
Browse files Browse the repository at this point in the history
  • Loading branch information
cartermp committed May 1, 2020
1 parent bdac5e8 commit 462a99c
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions src/MSBuild.Abstractions/MSBuildWorkspace.cs
Original file line number Diff line number Diff line change
Expand Up @@ -258,11 +258,18 @@ private bool IsSupportedProjectType(MSBuildProjectRootElement root)
return true;
case ProjectSupportType.Unsupported:
default:
var allSupportedProjectTypeGuids = DesktopFacts.KnownSupportedDesktopProjectTypeGuids.Select(ptg => ptg.ToString());
var allReadProjectTypeGuids = MSBuildHelpers.GetAllProjectTypeGuids(root);
Console.WriteLine($"{root.FullPath} is an unsupported project type. Not all project type guids are supported.");
PrintGuidMessage(allSupportedProjectTypeGuids, allReadProjectTypeGuids);
return false;
if (MSBuildHelpers.HasProjectTypeGuidsNode(root))
{
var allSupportedProjectTypeGuids = DesktopFacts.KnownSupportedDesktopProjectTypeGuids.Select(ptg => ptg.ToString());
var allReadProjectTypeGuids = MSBuildHelpers.GetAllProjectTypeGuids(root);
Console.WriteLine($"{root.FullPath} is an unsupported project type. Not all project type guids are supported.");
PrintGuidMessage(allSupportedProjectTypeGuids, allReadProjectTypeGuids);
return false;
}
else
{
return true;
}
}

static void PrintGuidMessage(IEnumerable<string> allSupportedProjectTypeGuids, IEnumerable<string> allReadProjectTypeGuids)
Expand Down

0 comments on commit 462a99c

Please sign in to comment.