File tree Expand file tree Collapse file tree
src/DotNetCampus.CommandLine Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11<Project Sdk =" Microsoft.NET.Sdk" >
22
33 <PropertyGroup >
4- <TargetFramework >net8.0</ TargetFramework >
4+ <TargetFrameworks >net8.0;net6.0</ TargetFrameworks >
55 <ImplicitUsings >enable</ImplicitUsings >
66 <PackageId >dotnetCampus.CommandLine</PackageId >
77 <GeneratePackageOnBuild >true</GeneratePackageOnBuild >
1111 <GenerateDocumentationFile >true</GenerateDocumentationFile >
1212 <ContinuousIntegrationBuild >true</ContinuousIntegrationBuild >
1313 <EmbedAllSources Condition =" '$(Configuration)' != 'debug'" >true</EmbedAllSources >
14+ <WarningLevel Condition =" '$(TargetFramework)' == 'net6.0'" >0</WarningLevel >
1415 </PropertyGroup >
1516
1617 <ItemGroup >
2223 <PrivateAssets >all</PrivateAssets >
2324 <IncludeAssets >runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets >
2425 </PackageReference >
26+ <PackageReference Condition =" '$(TargetFramework)' == 'net6.0'" Include =" System.Collections.Immutable" Version =" 8.0.0" />
2527 </ItemGroup >
2628
2729 <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)
8282 }
8383 }
8484
85+ #if NET8_0_OR_GREATER
8586 private static T ? ArgumentStringsToValue < T > ( ImmutableArray < string > ? arguments ) where T : IParsable < T > => arguments switch
8687 {
8788 null or { Length : 0 } => default ,
@@ -90,6 +91,7 @@ internal static bool ArgumentStringsToBoolean(ImmutableArray<string>? arguments)
9091 : throw new CommandLineParseValueException (
9192 $ "Value [{ values [ 0 ] } ] is not a valid value for type { typeof ( T ) . Name } .") ,
9293 } ;
94+ #endif
9395
9496 internal static byte ArgumentStringsToByte ( ImmutableArray < string > ? arguments ) => arguments switch
9597 {
You can’t perform that action at this time.
0 commit comments