private bool CheckTargetFrameworks(TextWriter textWriter, RoslynProjectData data) { if (!data.IsAnyUnitTest) { return(true); } var allGood = true; foreach (var targetFramework in _projectUtil.GetAllTargetFrameworks()) { switch (targetFramework) { case "net20": case "net46": case "net461": case "net462": case "netstandard1.3": case "netcoreapp1.1": case "netcoreapp2.0": case "$(RoslynPortableTargetFrameworks)": break; default: textWriter.WriteLine($"TargetFramework {targetFramework} is not supported in this build"); allGood = false; break; } } return(allGood); }
private bool CheckTargetFrameworks(TextWriter textWriter, RoslynProjectData data) { if (!data.IsAnyUnitTest) { return(true); } var allGood = true; foreach (var targetFramework in _projectUtil.GetAllTargetFrameworks()) { // TODO: Code Style projects need to be moved over to 4.7.2 and netstandard2.0 // https://devdiv.visualstudio.com/DevDiv/_workitems/edit/712825 if (ProjectFilePath.Contains("CodeStyle")) { switch (targetFramework) { case "net46": case "netstandard1.3": continue; } } else { switch (targetFramework) { case "net20": case "net472": case "netcoreapp1.1": case "netcoreapp2.1": case "netcoreapp3.0": case "$(RoslynPortableTargetFrameworks)": continue; } } textWriter.WriteLine($"TargetFramework {targetFramework} is not supported in this build"); allGood = false; } return(allGood); }