public static string GetParameterName(this TargetFramework framework) { var parameter = framework.Id.Version; //special case for 1.x if (framework.IsVersion1x()) { parameter = "1x"; } parameter = parameter.Replace(".", string.Empty); if (framework.IsNetCoreApp()) { return($"UseNetCore{parameter}"); } if (framework.IsNetStandard()) { return($"UseNetStandard{parameter}"); } return(string.Empty); }
public static bool IsNetCoreApp1x(this TargetFramework framework) { return(framework.IsNetCoreApp() && framework.IsVersion1x()); }
public static bool IsNetStandard1x(this TargetFramework framework) { return(framework.IsNetStandard() && framework.IsVersion1x()); }
public static bool IsNetCoreApp1x(this TargetFramework framework) => framework.IsNetCoreApp() && framework.IsVersion1x();