public static bool IsNet5App(this IOutputTarget outputTarget) { return(outputTarget.GetSupportedFrameworks().Any(x => x.StartsWith("net5"))); }
public IEnumerable <string> GetSupportedFrameworks() { return(_outputTarget.GetSupportedFrameworks()); }
//public static string SolutionFolder(this IProject outputTarget) //{ // return outputTarget.Folder.Name; //} //public static string TargetFrameworkVersion(this IProject outputTarget) //{ // var targetFramework = outputTarget.ProjectType.Properties.FirstOrDefault(x => x.Name == "TargetFramework"); // return outputTarget.GetStereotypeProperty("C# .NET", "FrameworkVersion", targetFramework != null ? $"v{targetFramework.Value}" : "v4.5.2"); //} public static string TargetFramework(this IOutputTarget outputTarget) { var targetFramework = outputTarget.GetSupportedFrameworks().FirstOrDefault(); return(targetFramework ?? "netcoreapp2.1"); }