File tree Expand file tree Collapse file tree 6 files changed +8
-7
lines changed
test/CommandLineUtils.Tests Expand file tree Collapse file tree 6 files changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ public Pager(IConsole console)
4545#if NET45
4646 // if .NET Framework, assume we're on Windows unless it's running on Mono.
4747 _enabled = Type . GetType ( "Mono.Runtime" ) != null ;
48- #elif NETSTANDARD2_0
48+ #elif NETSTANDARD2_0 || NETSTANDARD2_1
4949 _enabled = ! RuntimeInformation . IsOSPlatform ( OSPlatform . Windows ) && ! console . IsOutputRedirected ;
5050#else
5151#error Update target frameworks
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ private static class EmptyArrayCache<T>
1616 internal static readonly T [ ] Value = new T [ 0 ] ;
1717 }
1818
19- #elif NETSTANDARD2_0
19+ #elif NETSTANDARD2_0 || NETSTANDARD2_1
2020 => Array . Empty < T > ( ) ;
2121#else
2222#error Update target frameworks
Original file line number Diff line number Diff line change 11<Project Sdk =" Microsoft.NET.Sdk" >
22
33 <PropertyGroup >
4- <TargetFrameworks >netstandard2.0;net45</TargetFrameworks >
4+ <TargetFrameworks >netstandard2.1;netstandard2.0;net45</TargetFrameworks >
5+ <Nullable Condition =" '$(TargetFramework)' != 'netstandard2.1'" >annotations</Nullable >
56 <GenerateDocumentationFile >true</GenerateDocumentationFile >
67 <IsPackable >true</IsPackable >
78 <Description >Command-line parsing API.</Description >
@@ -20,7 +21,7 @@ McMaster.Extensions.CommandLineUtils.ArgumentEscaper
2021 <PackageTags >commandline;parsing</PackageTags >
2122 </PropertyGroup >
2223
23- <ItemGroup Condition =" '$(TargetFramework)' == 'netstandard2.0'" >
24+ <ItemGroup Condition =" '$(TargetFramework)' == 'netstandard2.0' OR '$(TargetFramework)' == 'netstandard2.1' " >
2425 <PackageReference Include =" System.ComponentModel.Annotations" Version =" 5.0.0" />
2526 </ItemGroup >
2627
Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ public static string FullPathOrDefault()
4545 var fileName = FileName ;
4646#if NET45
4747 fileName += ".exe" ;
48- #elif NETSTANDARD2_0
48+ #elif NETSTANDARD2_0 || NETSTANDARD2_1
4949 if ( RuntimeInformation . IsOSPlatform ( OSPlatform . Windows ) )
5050 {
5151 fileName += ".exe" ;
Original file line number Diff line number Diff line change 11<Project Sdk =" Microsoft.NET.Sdk" >
22
33 <PropertyGroup >
4- <TargetFramework >netstandard2.0</TargetFramework >
4+ <TargetFrameworks >netstandard2.1;netstandard2. 0</TargetFrameworks >
55 <GenerateDocumentationFile >true</GenerateDocumentationFile >
66 <IsPackable >true</IsPackable >
77 <Description >Provides command-line parsing API integration with the generic host API (Microsoft.Extensions.Hosting).</Description >
Original file line number Diff line number Diff line change 33
44// This file has been modified from the original form. See Notice.txt in the project root for more information.
55
6- #if NETCOREAPP
6+ #if NETCOREAPP || NET5_0
77using System . IO ;
88using Xunit ;
99
You can’t perform that action at this time.
0 commit comments