MultiProjectValidator Fixes
Ignore desktop frameworks (if specified)
This commit is contained in:
parent
2d70ffc508
commit
d8b04851e6
7 changed files with 40 additions and 18 deletions
17
tools/MultiProjectValidator/ProjectContextExtensions.cs
Normal file
17
tools/MultiProjectValidator/ProjectContextExtensions.cs
Normal 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);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue