Skip to content

Commit

Permalink
upgrade to dotnet 8
Browse files Browse the repository at this point in the history
  • Loading branch information
yassinebennani authored and jeremydmiller committed Nov 15, 2023
1 parent 58fc001 commit 0c35818
Show file tree
Hide file tree
Showing 25 changed files with 207 additions and 176 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,18 @@ jobs:
steps:
- uses: actions/checkout@v2


- name: Setup .NET 8
uses: actions/setup-dotnet@v3
with:
dotnet-version: 8.0.x
- name: Setup .NET
uses: actions/setup-dotnet@v1
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.x
- name: Setup .NET
uses: actions/setup-dotnet@v1
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.0.x
- name: Setup .NET 5
uses: actions/setup-dotnet@v1
with:
dotnet-version: 5.0.x

- name: Test
run: dotnet run -p build/build.csproj -- ci
2 changes: 1 addition & 1 deletion src/Aspect.Logger/Widget.Aspect.Logger.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net7.0;net6.0</TargetFrameworks>
<TargetFrameworks>net8.0;net7.0;net6.0</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,51 +1,51 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFrameworks>net6.0;net7.0</TargetFrameworks>

<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.2.0" />
<PackageReference Include="Shouldly" Version="4.2.1" />
<PackageReference Include="xunit" Version="2.5.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="coverlet.collector" Version="1.0.1" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net5.0' ">
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="[5.0.0,6.0.0)" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="[5.0.0,6.0.0)" />
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="[5.0.0,6.0.0)" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="[5.0.0,6.0.0)" />
<PackageReference Include="Microsoft.Extensions.Diagnostics.HealthChecks" Version="[5.0.0,6.0.0)" />
<PackageReference Include="Microsoft.Extensions.Diagnostics.HealthChecks.EntityFrameworkCore" Version="[5.0.0,6.0.0)" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net6.0' ">
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="[6.0.0,7.0.0)" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="[6.0.0,7.0.0)" />
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="[6.0.0,7.0.0)" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="[6.0.0,7.0.0)" />
<PackageReference Include="Microsoft.Extensions.Diagnostics.HealthChecks" Version="[6.0.0,7.0.0)" />
<PackageReference Include="Microsoft.Extensions.Diagnostics.HealthChecks.EntityFrameworkCore" Version="[6.0.0,7.0.0)" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net7.0' ">
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="[7.0.0,8.0.0)" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="[7.0.0,8.0.0)" />
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="[7.0.0,8.0.0)" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="[7.0.0,8.0.0)" />
<PackageReference Include="Microsoft.Extensions.Diagnostics.HealthChecks" Version="[7.0.0,8.0.0)" />
<PackageReference Include="Microsoft.Extensions.Diagnostics.HealthChecks.EntityFrameworkCore" Version="[7.0.0,8.0.0)" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Lamar.Microsoft.DependencyInjection\Lamar.Microsoft.DependencyInjection.csproj" />
</ItemGroup>
<PropertyGroup>
<TargetFrameworks>net6.0;net7.0;net8.0</TargetFrameworks>

<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageReference Include="Shouldly" Version="4.2.1" />
<PackageReference Include="xunit" Version="2.5.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="coverlet.collector" Version="1.0.1" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net6.0' ">
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="[6.0.0,7.0.0)" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="[6.0.0,7.0.0)" />
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="[6.0.0,7.0.0)" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="[6.0.0,7.0.0)" />
<PackageReference Include="Microsoft.Extensions.Diagnostics.HealthChecks" Version="[6.0.0,7.0.0)" />
<PackageReference Include="Microsoft.Extensions.Diagnostics.HealthChecks.EntityFrameworkCore" Version="[6.0.0,7.0.0)" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net7.0' ">
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="[7.0.0,8.0.0)" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="[7.0.0,8.0.0)" />
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="[7.0.0,8.0.0)" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="[7.0.0,8.0.0)" />
<PackageReference Include="Microsoft.Extensions.Diagnostics.HealthChecks" Version="[7.0.0,8.0.0)" />
<PackageReference Include="Microsoft.Extensions.Diagnostics.HealthChecks.EntityFrameworkCore" Version="[7.0.0,8.0.0)" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net8.0' ">
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="[8.0.0,9.0.0)" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="[8.0.0,9.0.0)" />
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="[8.0.0,9.0.0)" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="[8.0.0,9.0.0)" />
<PackageReference Include="Microsoft.Extensions.Diagnostics.HealthChecks" Version="[8.0.0,9.0.0)" />
<PackageReference Include="Microsoft.Extensions.Diagnostics.HealthChecks.EntityFrameworkCore" Version="[8.0.0,9.0.0)" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Lamar.Microsoft.DependencyInjection\Lamar.Microsoft.DependencyInjection.csproj" />
</ItemGroup>

</Project>
75 changes: 39 additions & 36 deletions src/Lamar.AspNetCoreTests/Lamar.AspNetCoreTests.csproj
Original file line number Diff line number Diff line change
@@ -1,43 +1,46 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net6.0;net7.0</TargetFrameworks>
<IsPackable>false</IsPackable>
</PropertyGroup>
<ItemGroup>
<PropertyGroup>
<TargetFrameworks>net6.0;net7.0;net8.0</TargetFrameworks>
<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="App.Metrics.AspNetCore.Mvc" Version="4.3.0" />
<PackageReference Include="AspNetCore.HealthChecks.UI" Version="5.0.1" />
<PackageReference Include="IdentityServer4" Version="4.1.2" />
<PackageReference Include="IdentityServer4.AccessTokenValidation" Version="3.0.1" />
<PackageReference Include="JasperFx.Core" Version="1.5.1" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="5.0.7" />
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="5.0.7" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageReference Include="xunit" Version="2.6.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.3">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Alba" Version="7.4.1" />
<PackageReference Include="Shouldly" Version="4.2.1" />
</ItemGroup>

<PackageReference Include="App.Metrics.AspNetCore.Mvc" Version="4.2.0" />
<PackageReference Include="AspNetCore.HealthChecks.UI" Version="5.0.1" />
<ItemGroup Condition=" '$(TargetFramework)' == 'net6.0' ">
<PackageReference Include=" Microsoft.Extensions.Diagnostics.HealthChecks" Version="[6.0.0,7.0.0)" />
</ItemGroup>

<PackageReference Include="IdentityServer4" Version="4.1.2" />
<PackageReference Include="IdentityServer4.AccessTokenValidation" Version="3.0.1" />
<PackageReference Include="JasperFx.Core" Version="1.4.0" />
<ItemGroup Condition=" '$(TargetFramework)' == 'net7.0' ">
<PackageReference Include=" Microsoft.Extensions.Diagnostics.HealthChecks" Version="[7.0.0,8.0.0)" />
</ItemGroup>

<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="5.0.7" />
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="5.0.7" />
<ItemGroup Condition=" '$(TargetFramework)' == 'net8.0' ">
<PackageReference Include=" Microsoft.Extensions.Diagnostics.HealthChecks" Version="[8.0.0,9.0.0)" />
</ItemGroup>

<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.5.0" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Lamar.Microsoft.DependencyInjection\Lamar.Microsoft.DependencyInjection.csproj" />
<PackageReference Include="Shouldly" Version="4.0.3" />

</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Lamar.Microsoft.DependencyInjection\Lamar.Microsoft.DependencyInjection.csproj" />
</ItemGroup>


<ItemGroup Condition=" '$(TargetFramework)' == 'net6.0' ">
<PackageReference Include="Alba" Version="7.4.0" />
<PackageReference Include=" Microsoft.Extensions.Diagnostics.HealthChecks" Version="6.0.0" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net7.0' ">
<PackageReference Include="Alba" Version="7.4.0" />
<PackageReference Include=" Microsoft.Extensions.Diagnostics.HealthChecks" Version="7.0.0" />
</ItemGroup>

<ItemGroup>
<None Update="appsettings.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup>
<None Update="appsettings.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
</Project>
6 changes: 3 additions & 3 deletions src/Lamar.Diagnostics/Lamar.Diagnostics.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<Description>Adds diagnostic checks to the command line of your Lamar-enabled ASP.Net Core app</Description>
<Version>12.0.2</Version>
<Authors>Jeremy D. Miller</Authors>
<TargetFrameworks>net6.0;net7.0</TargetFrameworks>
<TargetFrameworks>net6.0;net7.0;net8.0</TargetFrameworks>
<DebugType>portable</DebugType>
<AssemblyName>Lamar.Diagnostics</AssemblyName>
<PackageId>Lamar.Diagnostics</PackageId>
Expand All @@ -20,8 +20,8 @@

<ItemGroup>
<ProjectReference Include="..\Lamar\Lamar.csproj" />
<PackageReference Include="JasperFx.CodeGeneration.Commands" Version="1.1.1" />
<PackageReference Include="Oakton" Version="6.0.0" />
<PackageReference Include="JasperFx.CodeGeneration.Commands" Version="3.4.0" />
<PackageReference Include="Oakton" Version="6.1.0" />
</ItemGroup>

</Project>
6 changes: 2 additions & 4 deletions src/Lamar.Diagnostics/LamarServicesCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,7 @@ private void WriteSummaries(LamarServicesInput input, IGrouping<Assembly, IServi
{
AnsiConsole.MarkupLine("[bold]Key:[/] ");

var rule = new Rule($"[blue]Assembly Name (Assembly Version)[/]")
{Alignment = Justify.Left};
var rule = new Rule($"[blue]Assembly Name (Assembly Version)[/]") {Justification = Justify.Left};
AnsiConsole.Write(rule);


Expand All @@ -96,8 +95,7 @@ private void WriteAssemblyServices(LamarServicesInput input,
IGrouping<Assembly, IServiceFamilyConfiguration> @group, WhatDoIHaveDisplay displayMode,
IContainer container)
{
var rule = new Rule($"[blue]{@group.Key.GetName().Name} ({@group.Key.GetName().Version})[/]")
{Alignment = Justify.Left};
var rule = new Rule($"[blue]{@group.Key.GetName().Name} ({@group.Key.GetName().Version})[/]"){ Justification = Justify.Left};
AnsiConsole.Write(rule);

var namespaces = @group.GroupBy(x => x.ServiceType.ResolveServiceType().Namespace);
Expand Down
2 changes: 1 addition & 1 deletion src/Lamar.Diagnostics/ServiceCollectionExtensions.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using JasperFx.TypeDiscovery;
using JasperFx.Core.TypeScanning;
using Microsoft.Extensions.DependencyInjection;
using Oakton.Environment;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,30 +1,42 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Description>Lamar Adapter for HostBuilder Integration</Description>
<Version>12.0.2</Version>
<Authors>Jeremy D. Miller</Authors>
<TargetFrameworks>net6.0;net7.0</TargetFrameworks>
<DebugType>portable</DebugType>
<AssemblyName>Lamar.Microsoft.DependencyInjection</AssemblyName>
<PackageId>Lamar.Microsoft.DependencyInjection</PackageId>
<PackageIconUrl>https://avatars2.githubusercontent.com/u/10048186?v=3&amp;s=200</PackageIconUrl>
<PackageProjectUrl>https://jasperfx.github.io/lamar</PackageProjectUrl>
<PackageLicenseUrl>https://github.com/JasperFX/lamar/blob/master/LICENSE</PackageLicenseUrl>
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
<GenerateAssemblyCopyrightAttribute>false</GenerateAssemblyCopyrightAttribute>
<GenerateAssemblyVersionAttribute>false</GenerateAssemblyVersionAttribute>
<GenerateAssemblyFileVersionAttribute>false</GenerateAssemblyFileVersionAttribute>
<GenerateAssemblyInformationalVersionAttribute>false</GenerateAssemblyInformationalVersionAttribute>
</PropertyGroup>
<PropertyGroup>
<Description>Lamar Adapter for HostBuilder Integration</Description>
<Version>12.0.2</Version>
<Authors>Jeremy D. Miller</Authors>
<TargetFrameworks>net6.0;net7.0;net8.0</TargetFrameworks>
<DebugType>portable</DebugType>
<AssemblyName>Lamar.Microsoft.DependencyInjection</AssemblyName>
<PackageId>Lamar.Microsoft.DependencyInjection</PackageId>
<PackageIconUrl>https://avatars2.githubusercontent.com/u/10048186?v=3&amp;s=200</PackageIconUrl>
<PackageProjectUrl>https://jasperfx.github.io/lamar</PackageProjectUrl>
<PackageLicenseUrl>https://github.com/JasperFX/lamar/blob/master/LICENSE</PackageLicenseUrl>
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
<GenerateAssemblyCopyrightAttribute>false</GenerateAssemblyCopyrightAttribute>
<GenerateAssemblyVersionAttribute>false</GenerateAssemblyVersionAttribute>
<GenerateAssemblyFileVersionAttribute>false</GenerateAssemblyFileVersionAttribute>
<GenerateAssemblyInformationalVersionAttribute>false</GenerateAssemblyInformationalVersionAttribute>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="[6.0.0,8.0.0)" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="[6.0.0,8.0.0)" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="[6.0.0,8.0.0)" />
<PackageReference Include="Microsoft.Extensions.Options" Version="[6.0.0,8.0.0)" />
</ItemGroup>
<ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Lamar\Lamar.csproj" />
</ItemGroup>
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net8.0' ">
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="[8.0.0,9.0.0)" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="[8.0.0,9.0.0)" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="[8.0.0,9.0.0)" />
<PackageReference Include="Microsoft.Extensions.Options" Version="[8.0.0,9.0.0)" />
</ItemGroup>


<ItemGroup Condition=" '$(TargetFramework)' == 'net6.0' OR '$(TargetFramework)' == 'net7.0' ">
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="[6.0.0,8.0.0)" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="[6.0.0,8.0.0)" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="[6.0.0,8.0.0)" />
<PackageReference Include="Microsoft.Extensions.Options" Version="[6.0.0,8.0.0)" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Lamar\Lamar.csproj" />
</ItemGroup>
</Project>
17 changes: 10 additions & 7 deletions src/Lamar.Testing/Lamar.Testing.csproj
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net6.0;net7.0</TargetFrameworks>
<TargetFrameworks>net6.0;net7.0;net8.0</TargetFrameworks>
<LangVersion>10.0</LangVersion>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.3.0" />
<PackageReference Include="System.Data.SqlClient" Version="4.8.2" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1" />
<PackageReference Include="Shouldly" Version="3.0.0" />
<PackageReference Include="NSubstitute" Version="3.1.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageReference Include="System.Data.SqlClient" Version="4.8.5" />
<PackageReference Include="xunit" Version="2.6.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.3">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Shouldly" Version="4.2.1" />
<PackageReference Include="NSubstitute" Version="5.1.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Aspect.Logger\Widget.Aspect.Logger.csproj" />
Expand Down
Loading

0 comments on commit 0c35818

Please sign in to comment.