Skip to content

Commit

Permalink
Upgrade to .net 8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
aimenux committed Jan 14, 2024
1 parent b08042c commit 284bf12
Show file tree
Hide file tree
Showing 25 changed files with 396 additions and 40 deletions.
354 changes: 354 additions & 0 deletions .editorconfig

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.0.x
dotnet-version: 8.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build
Expand Down
Binary file added Directory.Build.props
Binary file not shown.
2 changes: 2 additions & 0 deletions SpectreCliDemo.sln
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
ProjectSection(SolutionItems) = preProject
.github\workflows\ci.yml = .github\workflows\ci.yml
README.md = README.md
.editorconfig = .editorconfig
Directory.Build.props = Directory.Build.props
EndProjectSection
EndProject
Global
Expand Down
16 changes: 8 additions & 8 deletions src/BasicWay/BasicWay.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Hosting" Version="6.0.1" />
<PackageReference Include="Scrutor" Version="4.2.0" />
<PackageReference Include="Serilog.Extensions.Hosting" Version="5.0.1" />
<PackageReference Include="Serilog.Settings.Configuration" Version="3.4.0" />
<PackageReference Include="Serilog.Sinks.Console" Version="4.1.0" />
<PackageReference Include="Spectre.Console" Version="0.45.0" />
<PackageReference Include="Spectre.Console.Cli" Version="0.45.0" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="8.0.0" />
<PackageReference Include="Scrutor" Version="4.2.2" />
<PackageReference Include="Serilog.Extensions.Hosting" Version="8.0.0" />
<PackageReference Include="Serilog.Settings.Configuration" Version="8.0.0" />
<PackageReference Include="Serilog.Sinks.Console" Version="5.0.1" />
<PackageReference Include="Spectre.Console" Version="0.48.0" />
<PackageReference Include="Spectre.Console.Cli" Version="0.48.0" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Microsoft.Extensions.Configuration;

namespace BasicWay.Infrastructure.Host;
namespace BasicWay.Common.Extensions;

public static class ConfigurationExtensions
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
using Serilog;
using Serilog.Debugging;

namespace BasicWay.Infrastructure.Host;
namespace BasicWay.Common.Extensions;

public static class LoggingExtensions
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System.Reflection;

namespace BasicWay.Infrastructure.Host;
namespace BasicWay.Common.Extensions;

public static class PathExtensions
{
Expand All @@ -18,5 +18,5 @@ public static string GetDirectoryPath()
}
}

public static string GetAssemblyLocation() => Assembly.GetExecutingAssembly().Location;
private static string GetAssemblyLocation() => Assembly.GetExecutingAssembly().Location;
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Spectre.Console.Cli;

namespace BasicWay.Infrastructure.Spectre
namespace BasicWay.Common.Spectre
{
public class SpectreCommandApp : ICommandApp
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Spectre.Console;

namespace BasicWay.Infrastructure.Spectre
namespace BasicWay.Common.Spectre
{
public static class SpectreExtensions
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Microsoft.Extensions.DependencyInjection;
using Spectre.Console.Cli;

namespace BasicWay.Infrastructure.Spectre;
namespace BasicWay.Common.Spectre;

public sealed class SpectreTypeRegistrar : ITypeRegistrar
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Spectre.Console.Cli;

namespace BasicWay.Infrastructure.Spectre;
namespace BasicWay.Common.Spectre;

public sealed class SpectreTypeResolver : ITypeResolver, IDisposable
{
Expand Down
4 changes: 2 additions & 2 deletions src/BasicWay/Program.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using BasicWay.Commands.Math;
using BasicWay.Commands.Path;
using BasicWay.Infrastructure.Host;
using BasicWay.Infrastructure.Spectre;
using BasicWay.Common.Extensions;
using BasicWay.Common.Spectre;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
Expand Down
2 changes: 1 addition & 1 deletion src/CustomWay/Commands/Math/MathConfigurator.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using CustomWay.Infrastructure.Spectre;
using CustomWay.Common.Spectre;
using Spectre.Console.Cli;

namespace CustomWay.Commands.Math
Expand Down
2 changes: 1 addition & 1 deletion src/CustomWay/Commands/Path/PathConfigurator.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using CustomWay.Infrastructure.Spectre;
using CustomWay.Common.Spectre;
using Spectre.Console.Cli;

namespace CustomWay.Commands.Path
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Microsoft.Extensions.Configuration;

namespace CustomWay.Infrastructure.Host;
namespace CustomWay.Common.Extensions;

public static class ConfigurationExtensions
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
using Serilog;
using Serilog.Debugging;

namespace CustomWay.Infrastructure.Host;
namespace CustomWay.Common.Extensions;

public static class LoggingExtensions
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System.Reflection;

namespace CustomWay.Infrastructure.Host;
namespace CustomWay.Common.Extensions;

public static class PathExtensions
{
Expand All @@ -18,5 +18,5 @@ public static string GetDirectoryPath()
}
}

public static string GetAssemblyLocation() => Assembly.GetExecutingAssembly().Location;
private static string GetAssemblyLocation() => Assembly.GetExecutingAssembly().Location;
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Spectre.Console.Cli;

namespace CustomWay.Infrastructure.Spectre;
namespace CustomWay.Common.Spectre;

public interface ISpectreConfigurator
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Spectre.Console.Cli;

namespace CustomWay.Infrastructure.Spectre
namespace CustomWay.Common.Spectre
{
public class SpectreCommandApp : ICommandApp
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using Spectre.Console;
using Spectre.Console.Cli;

namespace CustomWay.Infrastructure.Spectre
namespace CustomWay.Common.Spectre
{
public static class SpectreExtensions
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Microsoft.Extensions.DependencyInjection;
using Spectre.Console.Cli;

namespace CustomWay.Infrastructure.Spectre;
namespace CustomWay.Common.Spectre;

public sealed class SpectreTypeRegistrar : ITypeRegistrar
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Spectre.Console.Cli;

namespace CustomWay.Infrastructure.Spectre;
namespace CustomWay.Common.Spectre;

public sealed class SpectreTypeResolver : ITypeResolver, IDisposable
{
Expand Down
16 changes: 8 additions & 8 deletions src/CustomWay/CustomWay.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Hosting" Version="6.0.1" />
<PackageReference Include="Scrutor" Version="4.2.0" />
<PackageReference Include="Serilog.Extensions.Hosting" Version="5.0.1" />
<PackageReference Include="Serilog.Settings.Configuration" Version="3.4.0" />
<PackageReference Include="Serilog.Sinks.Console" Version="4.1.0" />
<PackageReference Include="Spectre.Console" Version="0.45.0" />
<PackageReference Include="Spectre.Console.Cli" Version="0.45.0" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="8.0.0" />
<PackageReference Include="Scrutor" Version="4.2.2" />
<PackageReference Include="Serilog.Extensions.Hosting" Version="8.0.0" />
<PackageReference Include="Serilog.Settings.Configuration" Version="8.0.0" />
<PackageReference Include="Serilog.Sinks.Console" Version="5.0.1" />
<PackageReference Include="Spectre.Console" Version="0.48.0" />
<PackageReference Include="Spectre.Console.Cli" Version="0.48.0" />
</ItemGroup>

<ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions src/CustomWay/Program.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using CustomWay.Infrastructure.Host;
using CustomWay.Infrastructure.Spectre;
using CustomWay.Common.Extensions;
using CustomWay.Common.Spectre;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
Expand Down

0 comments on commit 284bf12

Please sign in to comment.