diff --git a/.azure-pipelines/build.yml b/.azure-pipelines/build.yml
index 5aae598..6e7582c 100644
--- a/.azure-pipelines/build.yml
+++ b/.azure-pipelines/build.yml
@@ -23,7 +23,7 @@ jobs:
- task: UseDotNet@2
inputs:
packageType: 'sdk'
- version: 7.0.x
+ version: 8.0.x
- script: dotnet restore
displayName: dotnet restore
@@ -78,7 +78,7 @@ jobs:
- task: UseDotNet@2
inputs:
packageType: 'sdk'
- version: 7.0.x
+ version: 8.0.x
- script: dotnet restore
displayName: dotnet restore
diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml
index 0414384..036d4c7 100644
--- a/.github/workflows/build.yaml
+++ b/.github/workflows/build.yaml
@@ -21,7 +21,7 @@ jobs:
dotnet-version: |
3.1.x
6.0.x
- 7.0.x
+ 8.0.x
# Build
- run: dotnet restore
diff --git a/global.json b/global.json
index 1c7274b..501e79a 100644
--- a/global.json
+++ b/global.json
@@ -1,6 +1,6 @@
{
"sdk": {
- "version": "7.0.100",
+ "version": "8.0.100",
"rollForward": "latestFeature"
}
}
\ No newline at end of file
diff --git a/perf/Cocona.Benchmark.External/Cocona.Benchmark.External.csproj b/perf/Cocona.Benchmark.External/Cocona.Benchmark.External.csproj
index 9b74dc2..a62dd81 100644
--- a/perf/Cocona.Benchmark.External/Cocona.Benchmark.External.csproj
+++ b/perf/Cocona.Benchmark.External/Cocona.Benchmark.External.csproj
@@ -2,19 +2,19 @@
Exe
- net6.0
+ net8.0
enable
annotations
-
-
+
+
-
-
-
-
+
+
+
+
diff --git a/perf/Cocona.Benchmark.External/Commands/CliFxCommand.cs b/perf/Cocona.Benchmark.External/Commands/CliFxCommand.cs
index 3566c99..6d73e06 100644
--- a/perf/Cocona.Benchmark.External/Commands/CliFxCommand.cs
+++ b/perf/Cocona.Benchmark.External/Commands/CliFxCommand.cs
@@ -1,5 +1,5 @@
using CliFx.Attributes;
-using CliFx.Services;
+using CliFx.Infrastructure;
namespace Cocona.Benchmark.External.Commands;
@@ -14,6 +14,6 @@ public class CliFxCommand : CliFx.ICommand
[CommandOption("bool", 'b')]
public bool BoolOption { get; set; }
-
- public Task ExecuteAsync(IConsole console) => Task.CompletedTask;
-}
\ No newline at end of file
+
+ public ValueTask ExecuteAsync(IConsole console) => ValueTask.CompletedTask;
+}
diff --git a/perf/Cocona.Benchmark.Performance/Cocona.Benchmark.Performance.csproj b/perf/Cocona.Benchmark.Performance/Cocona.Benchmark.Performance.csproj
index f3625a1..0ca757a 100644
--- a/perf/Cocona.Benchmark.Performance/Cocona.Benchmark.Performance.csproj
+++ b/perf/Cocona.Benchmark.Performance/Cocona.Benchmark.Performance.csproj
@@ -2,12 +2,12 @@
Exe
- net6.0
+ net8.0
enable
-
+
diff --git a/samples/Advanced.CommandMethodForwarding/CoconaSample.Advanced.CommandMethodForwarding.csproj b/samples/Advanced.CommandMethodForwarding/CoconaSample.Advanced.CommandMethodForwarding.csproj
index 3363f83..2823c13 100644
--- a/samples/Advanced.CommandMethodForwarding/CoconaSample.Advanced.CommandMethodForwarding.csproj
+++ b/samples/Advanced.CommandMethodForwarding/CoconaSample.Advanced.CommandMethodForwarding.csproj
@@ -2,7 +2,7 @@
Exe
- net6.0
+ net8.0
enable
diff --git a/samples/Advanced.GenericHost/CoconaSample.Advanced.GenericHost.csproj b/samples/Advanced.GenericHost/CoconaSample.Advanced.GenericHost.csproj
index 8b35a58..8d1e804 100644
--- a/samples/Advanced.GenericHost/CoconaSample.Advanced.GenericHost.csproj
+++ b/samples/Advanced.GenericHost/CoconaSample.Advanced.GenericHost.csproj
@@ -2,7 +2,7 @@
Exe
- net6.0
+ net8.0
enable
diff --git a/samples/Advanced.HelpOnDemand/CoconaSample.Advanced.HelpOnDemand.csproj b/samples/Advanced.HelpOnDemand/CoconaSample.Advanced.HelpOnDemand.csproj
index b2c77f9..fed6650 100644
--- a/samples/Advanced.HelpOnDemand/CoconaSample.Advanced.HelpOnDemand.csproj
+++ b/samples/Advanced.HelpOnDemand/CoconaSample.Advanced.HelpOnDemand.csproj
@@ -2,7 +2,7 @@
Exe
- net6.0
+ net8.0
enable
diff --git a/samples/Advanced.HelpTransformer/CoconaSample.Advanced.HelpTransformer.csproj b/samples/Advanced.HelpTransformer/CoconaSample.Advanced.HelpTransformer.csproj
index 1827e5f..8d11cd8 100644
--- a/samples/Advanced.HelpTransformer/CoconaSample.Advanced.HelpTransformer.csproj
+++ b/samples/Advanced.HelpTransformer/CoconaSample.Advanced.HelpTransformer.csproj
@@ -2,7 +2,7 @@
Exe
- net6.0
+ net8.0
enable
diff --git a/samples/Advanced.JsonValueConverter/CoconaSample.Advanced.JsonValueConverter.csproj b/samples/Advanced.JsonValueConverter/CoconaSample.Advanced.JsonValueConverter.csproj
index a59bb2a..934ff4d 100644
--- a/samples/Advanced.JsonValueConverter/CoconaSample.Advanced.JsonValueConverter.csproj
+++ b/samples/Advanced.JsonValueConverter/CoconaSample.Advanced.JsonValueConverter.csproj
@@ -2,7 +2,7 @@
Exe
- net6.0
+ net8.0
enable
diff --git a/samples/Advanced.Localization/CoconaSample.Advanced.Localization.csproj b/samples/Advanced.Localization/CoconaSample.Advanced.Localization.csproj
index e79f64e..e025a1b 100644
--- a/samples/Advanced.Localization/CoconaSample.Advanced.Localization.csproj
+++ b/samples/Advanced.Localization/CoconaSample.Advanced.Localization.csproj
@@ -2,13 +2,13 @@
Exe
- net6.0
+ net8.0
enable
enable
-
+
diff --git a/samples/Advanced.OptionLikeCommand/CoconaSample.Advanced.OptionLikeCommand.csproj b/samples/Advanced.OptionLikeCommand/CoconaSample.Advanced.OptionLikeCommand.csproj
index 3363f83..2823c13 100644
--- a/samples/Advanced.OptionLikeCommand/CoconaSample.Advanced.OptionLikeCommand.csproj
+++ b/samples/Advanced.OptionLikeCommand/CoconaSample.Advanced.OptionLikeCommand.csproj
@@ -2,7 +2,7 @@
Exe
- net6.0
+ net8.0
enable
diff --git a/samples/Advanced.PreventMultipleInstances/CoconaSample.Advanced.PreventMultipleInstances.csproj b/samples/Advanced.PreventMultipleInstances/CoconaSample.Advanced.PreventMultipleInstances.csproj
index 8b35a58..8d1e804 100644
--- a/samples/Advanced.PreventMultipleInstances/CoconaSample.Advanced.PreventMultipleInstances.csproj
+++ b/samples/Advanced.PreventMultipleInstances/CoconaSample.Advanced.PreventMultipleInstances.csproj
@@ -2,7 +2,7 @@
Exe
- net6.0
+ net8.0
enable
diff --git a/samples/Advanced.ShellCompletionCandidates/CoconaSample.Advanced.ShellCompletionCandidates.csproj b/samples/Advanced.ShellCompletionCandidates/CoconaSample.Advanced.ShellCompletionCandidates.csproj
index 3363f83..2823c13 100644
--- a/samples/Advanced.ShellCompletionCandidates/CoconaSample.Advanced.ShellCompletionCandidates.csproj
+++ b/samples/Advanced.ShellCompletionCandidates/CoconaSample.Advanced.ShellCompletionCandidates.csproj
@@ -2,7 +2,7 @@
Exe
- net6.0
+ net8.0
enable
diff --git a/samples/GettingStarted.MinimalApp/CoconaSample.GettingStarted.MinimalApp.csproj b/samples/GettingStarted.MinimalApp/CoconaSample.GettingStarted.MinimalApp.csproj
index 8b35a58..8d1e804 100644
--- a/samples/GettingStarted.MinimalApp/CoconaSample.GettingStarted.MinimalApp.csproj
+++ b/samples/GettingStarted.MinimalApp/CoconaSample.GettingStarted.MinimalApp.csproj
@@ -2,7 +2,7 @@
Exe
- net6.0
+ net8.0
enable
diff --git a/samples/GettingStarted.SubCommandApp/CoconaSample.GettingStarted.SubCommandApp.csproj b/samples/GettingStarted.SubCommandApp/CoconaSample.GettingStarted.SubCommandApp.csproj
index 8b35a58..8d1e804 100644
--- a/samples/GettingStarted.SubCommandApp/CoconaSample.GettingStarted.SubCommandApp.csproj
+++ b/samples/GettingStarted.SubCommandApp/CoconaSample.GettingStarted.SubCommandApp.csproj
@@ -2,7 +2,7 @@
Exe
- net6.0
+ net8.0
enable
diff --git a/samples/GettingStarted.TypicalSimpleApp/CoconaSample.GettingStarted.TypicalSimpleApp.csproj b/samples/GettingStarted.TypicalSimpleApp/CoconaSample.GettingStarted.TypicalSimpleApp.csproj
index 8b35a58..8d1e804 100644
--- a/samples/GettingStarted.TypicalSimpleApp/CoconaSample.GettingStarted.TypicalSimpleApp.csproj
+++ b/samples/GettingStarted.TypicalSimpleApp/CoconaSample.GettingStarted.TypicalSimpleApp.csproj
@@ -2,7 +2,7 @@
Exe
- net6.0
+ net8.0
enable
diff --git a/samples/InAction.AppConfiguration/CoconaSample.InAction.AppConfiguration.csproj b/samples/InAction.AppConfiguration/CoconaSample.InAction.AppConfiguration.csproj
index ea976e8..736dc52 100644
--- a/samples/InAction.AppConfiguration/CoconaSample.InAction.AppConfiguration.csproj
+++ b/samples/InAction.AppConfiguration/CoconaSample.InAction.AppConfiguration.csproj
@@ -2,7 +2,7 @@
Exe
- net6.0
+ net8.0
enable
diff --git a/samples/InAction.CommandFilter/CoconaSample.InAction.CommandFilter.csproj b/samples/InAction.CommandFilter/CoconaSample.InAction.CommandFilter.csproj
index 8b35a58..8d1e804 100644
--- a/samples/InAction.CommandFilter/CoconaSample.InAction.CommandFilter.csproj
+++ b/samples/InAction.CommandFilter/CoconaSample.InAction.CommandFilter.csproj
@@ -2,7 +2,7 @@
Exe
- net6.0
+ net8.0
enable
diff --git a/samples/InAction.CommandOptionOverload/CoconaSample.InAction.CommandOptionOverload.csproj b/samples/InAction.CommandOptionOverload/CoconaSample.InAction.CommandOptionOverload.csproj
index 8b35a58..8d1e804 100644
--- a/samples/InAction.CommandOptionOverload/CoconaSample.InAction.CommandOptionOverload.csproj
+++ b/samples/InAction.CommandOptionOverload/CoconaSample.InAction.CommandOptionOverload.csproj
@@ -2,7 +2,7 @@
Exe
- net6.0
+ net8.0
enable
diff --git a/samples/InAction.CommandOptions/CoconaSample.InAction.CommandOptions.csproj b/samples/InAction.CommandOptions/CoconaSample.InAction.CommandOptions.csproj
index 8b35a58..8d1e804 100644
--- a/samples/InAction.CommandOptions/CoconaSample.InAction.CommandOptions.csproj
+++ b/samples/InAction.CommandOptions/CoconaSample.InAction.CommandOptions.csproj
@@ -2,7 +2,7 @@
Exe
- net6.0
+ net8.0
enable
diff --git a/samples/InAction.DependencyInjection/CoconaSample.InAction.DependencyInjection.csproj b/samples/InAction.DependencyInjection/CoconaSample.InAction.DependencyInjection.csproj
index 8b35a58..8d1e804 100644
--- a/samples/InAction.DependencyInjection/CoconaSample.InAction.DependencyInjection.csproj
+++ b/samples/InAction.DependencyInjection/CoconaSample.InAction.DependencyInjection.csproj
@@ -2,7 +2,7 @@
Exe
- net6.0
+ net8.0
enable
diff --git a/samples/InAction.ExitCode/CoconaSample.InAction.ExitCode.csproj b/samples/InAction.ExitCode/CoconaSample.InAction.ExitCode.csproj
index 8b35a58..8d1e804 100644
--- a/samples/InAction.ExitCode/CoconaSample.InAction.ExitCode.csproj
+++ b/samples/InAction.ExitCode/CoconaSample.InAction.ExitCode.csproj
@@ -2,7 +2,7 @@
Exe
- net6.0
+ net8.0
enable
diff --git a/samples/InAction.HandleShutdownSignal/CoconaSample.InAction.HandleShutdownSignal.csproj b/samples/InAction.HandleShutdownSignal/CoconaSample.InAction.HandleShutdownSignal.csproj
index 8b35a58..8d1e804 100644
--- a/samples/InAction.HandleShutdownSignal/CoconaSample.InAction.HandleShutdownSignal.csproj
+++ b/samples/InAction.HandleShutdownSignal/CoconaSample.InAction.HandleShutdownSignal.csproj
@@ -2,7 +2,7 @@
Exe
- net6.0
+ net8.0
enable
diff --git a/samples/InAction.ManyArguments/CoconaSample.InAction.ManyArguments.csproj b/samples/InAction.ManyArguments/CoconaSample.InAction.ManyArguments.csproj
index 8b35a58..8d1e804 100644
--- a/samples/InAction.ManyArguments/CoconaSample.InAction.ManyArguments.csproj
+++ b/samples/InAction.ManyArguments/CoconaSample.InAction.ManyArguments.csproj
@@ -2,7 +2,7 @@
Exe
- net6.0
+ net8.0
enable
diff --git a/samples/InAction.MultipleCommandTypes/CoconaSample.InAction.MultipleCommandTypes.csproj b/samples/InAction.MultipleCommandTypes/CoconaSample.InAction.MultipleCommandTypes.csproj
index 8b35a58..8d1e804 100644
--- a/samples/InAction.MultipleCommandTypes/CoconaSample.InAction.MultipleCommandTypes.csproj
+++ b/samples/InAction.MultipleCommandTypes/CoconaSample.InAction.MultipleCommandTypes.csproj
@@ -2,7 +2,7 @@
Exe
- net6.0
+ net8.0
enable
diff --git a/samples/InAction.ParameterSet/CoconaSample.InAction.ParameterSet.csproj b/samples/InAction.ParameterSet/CoconaSample.InAction.ParameterSet.csproj
index 8b35a58..8d1e804 100644
--- a/samples/InAction.ParameterSet/CoconaSample.InAction.ParameterSet.csproj
+++ b/samples/InAction.ParameterSet/CoconaSample.InAction.ParameterSet.csproj
@@ -2,7 +2,7 @@
Exe
- net6.0
+ net8.0
enable
diff --git a/samples/InAction.Validation/CoconaSample.InAction.Validation.csproj b/samples/InAction.Validation/CoconaSample.InAction.Validation.csproj
index b2c77f9..fed6650 100644
--- a/samples/InAction.Validation/CoconaSample.InAction.Validation.csproj
+++ b/samples/InAction.Validation/CoconaSample.InAction.Validation.csproj
@@ -2,7 +2,7 @@
Exe
- net6.0
+ net8.0
enable
diff --git a/samples/MinimalApi.InAction/CoconaSample.MinimalApi.InAction.csproj b/samples/MinimalApi.InAction/CoconaSample.MinimalApi.InAction.csproj
index 441d04a..50852b3 100644
--- a/samples/MinimalApi.InAction/CoconaSample.MinimalApi.InAction.csproj
+++ b/samples/MinimalApi.InAction/CoconaSample.MinimalApi.InAction.csproj
@@ -2,7 +2,7 @@
Exe
- net6.0
+ net8.0
enable
enable
diff --git a/samples/MinimalApi.MultipleCommands/CoconaSample.MinimalApi.MultipleCommands.csproj b/samples/MinimalApi.MultipleCommands/CoconaSample.MinimalApi.MultipleCommands.csproj
index 30ff60f..b567b99 100644
--- a/samples/MinimalApi.MultipleCommands/CoconaSample.MinimalApi.MultipleCommands.csproj
+++ b/samples/MinimalApi.MultipleCommands/CoconaSample.MinimalApi.MultipleCommands.csproj
@@ -2,7 +2,7 @@
Exe
- net6.0
+ net8.0
enable
enable
diff --git a/samples/MinimalApi.QuickStart/CoconaSample.MinimalApi.QuickStart.csproj b/samples/MinimalApi.QuickStart/CoconaSample.MinimalApi.QuickStart.csproj
index 30ff60f..b567b99 100644
--- a/samples/MinimalApi.QuickStart/CoconaSample.MinimalApi.QuickStart.csproj
+++ b/samples/MinimalApi.QuickStart/CoconaSample.MinimalApi.QuickStart.csproj
@@ -2,7 +2,7 @@
Exe
- net6.0
+ net8.0
enable
enable
diff --git a/samples/MinimalApi.SubCommand/CoconaSample.MinimalApi.SubCommand.csproj b/samples/MinimalApi.SubCommand/CoconaSample.MinimalApi.SubCommand.csproj
index 441d04a..50852b3 100644
--- a/samples/MinimalApi.SubCommand/CoconaSample.MinimalApi.SubCommand.csproj
+++ b/samples/MinimalApi.SubCommand/CoconaSample.MinimalApi.SubCommand.csproj
@@ -2,7 +2,7 @@
Exe
- net6.0
+ net8.0
enable
enable
diff --git a/src/Cocona.Core/Cocona.Core.csproj b/src/Cocona.Core/Cocona.Core.csproj
index 9d8e1d4..92b1546 100644
--- a/src/Cocona.Core/Cocona.Core.csproj
+++ b/src/Cocona.Core/Cocona.Core.csproj
@@ -1,7 +1,7 @@
- net6.0;netstandard2.0;netstandard2.1
+ net8.0;net6.0;netstandard2.0;netstandard2.1
Cocona
enable
enable
@@ -11,15 +11,15 @@
-
+
-
+
-
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
diff --git a/src/Cocona.Lite/Cocona.Lite.csproj b/src/Cocona.Lite/Cocona.Lite.csproj
index f7f689e..b9a8422 100644
--- a/src/Cocona.Lite/Cocona.Lite.csproj
+++ b/src/Cocona.Lite/Cocona.Lite.csproj
@@ -1,7 +1,7 @@
- net6.0;netstandard2.0;netstandard2.1
+ net8.0;net6.0;netstandard2.0;netstandard2.1
Cocona
enable
enable
@@ -13,7 +13,7 @@
-
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
diff --git a/src/Cocona/Builder/Internal/BootstrapHostBuilder.cs b/src/Cocona/Builder/Internal/BootstrapHostBuilder.cs
index 3ffe256..7e00113 100644
--- a/src/Cocona/Builder/Internal/BootstrapHostBuilder.cs
+++ b/src/Cocona/Builder/Internal/BootstrapHostBuilder.cs
@@ -38,17 +38,11 @@ public IHost Build()
action(hostConfiguration);
}
- var contentRootPath = ResolveContentRootPath(hostConfiguration[HostDefaults.ContentRootKey], AppContext.BaseDirectory);
+ var contentRootPath = ResolveContentRootPath(hostConfiguration[HostDefaults.ContentRootKey]!, AppContext.BaseDirectory);
var hostBuilderContext = new HostBuilderContext(new Dictionary