dotnet-installer/tools/MultiProjectValidator/ProjectContextExtensions.cs
Bryan d8b04851e6 MultiProjectValidator Fixes
Ignore desktop frameworks (if specified)
2016-01-11 17:54:33 -08:00

17 lines
496 B
C#

using System.IO;
using System.Collections.Generic;
using Microsoft.DotNet.ProjectModel;
namespace MultiProjectValidator
{
public static class ProjectContextExtensions
{
private static readonly string s_desktopTfmPrefix = ".NETFramework";
public static bool TargetIsDesktop(this ProjectContext context)
{
var targetFramework = context.TargetFramework.ToString();
return targetFramework.StartsWith(s_desktopTfmPrefix);
}
}
}