d8b04851e6
Ignore desktop frameworks (if specified)
17 lines
496 B
C#
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);
|
|
}
|
|
}
|
|
}
|