MultiProjectValidator Fixes

Ignore desktop frameworks (if specified)
This commit is contained in:
Bryan 2016-01-07 17:10:45 -08:00
parent 2d70ffc508
commit d8b04851e6
7 changed files with 40 additions and 18 deletions

View file

@ -0,0 +1,17 @@
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);
}
}
}