File tree 2 files changed +5
-1
lines changed
src/DotNetCampus.CommandLine 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change 1
1
<Project Sdk =" Microsoft.NET.Sdk" >
2
2
3
3
<PropertyGroup >
4
- <TargetFramework >net8.0</ TargetFramework >
4
+ <TargetFrameworks >net8.0;net6.0</ TargetFrameworks >
5
5
<ImplicitUsings >enable</ImplicitUsings >
6
6
<PackageId >dotnetCampus.CommandLine</PackageId >
7
7
<GeneratePackageOnBuild >true</GeneratePackageOnBuild >
11
11
<GenerateDocumentationFile >true</GenerateDocumentationFile >
12
12
<ContinuousIntegrationBuild >true</ContinuousIntegrationBuild >
13
13
<EmbedAllSources Condition =" '$(Configuration)' != 'debug'" >true</EmbedAllSources >
14
+ <WarningLevel Condition =" '$(TargetFramework)' == 'net6.0'" >0</WarningLevel >
14
15
</PropertyGroup >
15
16
16
17
<ItemGroup >
22
23
<PrivateAssets >all</PrivateAssets >
23
24
<IncludeAssets >runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets >
24
25
</PackageReference >
26
+ <PackageReference Condition =" '$(TargetFramework)' == 'net6.0'" Include =" System.Collections.Immutable" Version =" 8.0.0" />
25
27
</ItemGroup >
26
28
27
29
<Target Name =" _IncludeAllDependencies" BeforeTargets =" _GetPackageFiles" >
Original file line number Diff line number Diff line change @@ -82,6 +82,7 @@ internal static bool ArgumentStringsToBoolean(ImmutableArray<string>? arguments)
82
82
}
83
83
}
84
84
85
+ #if NET8_0_OR_GREATER
85
86
private static T ? ArgumentStringsToValue < T > ( ImmutableArray < string > ? arguments ) where T : IParsable < T > => arguments switch
86
87
{
87
88
null or { Length : 0 } => default ,
@@ -90,6 +91,7 @@ internal static bool ArgumentStringsToBoolean(ImmutableArray<string>? arguments)
90
91
: throw new CommandLineParseValueException (
91
92
$ "Value [{ values [ 0 ] } ] is not a valid value for type { typeof ( T ) . Name } .") ,
92
93
} ;
94
+ #endif
93
95
94
96
internal static byte ArgumentStringsToByte ( ImmutableArray < string > ? arguments ) => arguments switch
95
97
{
You can’t perform that action at this time.
0 commit comments