Skip to content

Commit

Permalink
Add support for .NET 9
Browse files Browse the repository at this point in the history
  • Loading branch information
niemyjski committed Oct 9, 2024
1 parent 24e4c53 commit dfe98b7
Show file tree
Hide file tree
Showing 15 changed files with 38 additions and 38 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM mcr.microsoft.com/devcontainers/dotnet:0-8.0
FROM mcr.microsoft.com/devcontainers/dotnet:0-9.0

RUN apt-get clean -y && rm -rf /var/lib/apt/lists/* /tmp/library-scripts

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build-arm64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ jobs:
- name: Setup .NET Core
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.*
#dotnet-quality: preview
dotnet-version: 9.0.*
dotnet-quality: preview
- name: Build Reason
env:
GITHUB_EVENT: ${{ toJson(github) }}
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ jobs:
- name: Setup .NET Core
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.*
#dotnet-quality: preview
dotnet-version: 9.0.*
dotnet-quality: preview

- name: Version
id: version
Expand All @@ -64,8 +64,8 @@ jobs:
- name: Setup .NET Core
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.*
#dotnet-quality: preview
dotnet-version: 9.0.*
dotnet-quality: preview

- name: Start Services
working-directory: docker
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/elasticsearch-docker-7.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: Setup .NET Core
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.*
dotnet-version: 9.0.*
#dotnet-quality: preview
- name: Build Reason
env:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/elasticsearch-docker-8.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ jobs:
- name: Setup .NET Core
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.*
#dotnet-quality: preview
dotnet-version: 9.0.*
dotnet-quality: preview
- name: Build Reason
env:
GITHUB_EVENT: ${{ toJson(github) }}
Expand Down
4 changes: 2 additions & 2 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"request": "launch",
"preLaunchTask": "build",
// If you have changed target frameworks, make sure to update the program path.
"program": "${workspaceFolder}/src/Exceptionless.Web/bin/Debug/net8.0/Exceptionless.Web.dll",
"program": "${workspaceFolder}/src/Exceptionless.Web/bin/Debug/net9.0/Exceptionless.Web.dll",
"args": [],
"cwd": "${workspaceFolder}/src/Exceptionless.Web",
"stopAtEntry": false,
Expand All @@ -25,7 +25,7 @@
"request": "launch",
"preLaunchTask": "build",
// If you have changed target frameworks, make sure to update the program path.
"program": "${workspaceFolder}/src/Exceptionless.Job/bin/Debug/net8.0/Exceptionless.Job.dll",
"program": "${workspaceFolder}/src/Exceptionless.Job/bin/Debug/net9.0/Exceptionless.Job.dll",
"args": [],
"cwd": "${workspaceFolder}",
"stopAtEntry": false,
Expand Down
12 changes: 6 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build
WORKDIR /app

COPY ./*.sln ./NuGet.Config ./
Expand Down Expand Up @@ -36,7 +36,7 @@ RUN dotnet publish -c Release -o out

# job

FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS job
FROM mcr.microsoft.com/dotnet/aspnet:9.0 AS job
WORKDIR /app
COPY --from=job-publish /app/src/Exceptionless.Job/out ./

Expand All @@ -56,7 +56,7 @@ RUN dotnet publish -c Release -o out /p:SkipSpaPublish=true

# api

FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS api
FROM mcr.microsoft.com/dotnet/aspnet:9.0 AS api
WORKDIR /app
COPY --from=api-publish /app/src/Exceptionless.Web/out ./

Expand All @@ -76,7 +76,7 @@ RUN dotnet publish -c Release -o out

# app

FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS app
FROM mcr.microsoft.com/dotnet/aspnet:9.0 AS app

WORKDIR /app
COPY --from=app-publish /app/src/Exceptionless.Web/out ./
Expand Down Expand Up @@ -148,7 +148,7 @@ USER elasticsearch

RUN wget https://dot.net/v1/dotnet-install.sh -O dotnet-install.sh && \
chmod +x dotnet-install.sh && \
./dotnet-install.sh --channel 8.0 --quality ga --runtime aspnetcore && \
./dotnet-install.sh --channel 9.0 --quality preview --runtime aspnetcore && \
rm dotnet-install.sh

EXPOSE 8080 9200
Expand Down Expand Up @@ -206,7 +206,7 @@ USER elasticsearch

RUN wget https://dot.net/v1/dotnet-install.sh -O dotnet-install.sh && \
chmod +x dotnet-install.sh && \
./dotnet-install.sh --channel 8.0 --quality ga --runtime aspnetcore && \
./dotnet-install.sh --channel 9.0 --quality preview --runtime aspnetcore && \
rm dotnet-install.sh

EXPOSE 8080 9200
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ _In appreciation for anyone who submits a non-trivial pull request, we will give
- Please read the [contributing document](https://github.com/exceptionless/Exceptionless/blob/main/CONTRIBUTING.md)
- Requirements
- [Docker](https://www.docker.com/get-docker)
- [.NET 8.0](https://dotnet.microsoft.com/)
- [.NET 9.0](https://dotnet.microsoft.com/)
- [Node 20+](https://nodejs.org/)
- Visual Studio Code
- Open Visual Studio Code and then open the Exceptionless root folder
Expand Down
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"sdk": {
"version": "8.0.100",
"version": "9.0.100-rc*",
"rollForward": "latestMinor"
}
}
4 changes: 2 additions & 2 deletions src/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<Project>
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Product>Exceptionless</Product>
<MinVerSkip Condition="'$(Configuration)' == 'Debug'">true</MinVerSkip>
<MinVerTagPrefix>v</MinVerTagPrefix>
<Copyright>Copyright (c) 2024 Exceptionless. All rights reserved.</Copyright>
<RepositoryUrl>https://github.com/exceptionless/exceptionless</RepositoryUrl>
<Authors>Exceptionless</Authors>
<NoWarn>$(NoWarn);CS1591</NoWarn>
<NoWarn>$(NoWarn);CS1591;NU1902;NU1903;NU1904</NoWarn>
<Nullable>enable</Nullable>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
Expand Down
8 changes: 4 additions & 4 deletions src/Exceptionless.Core/Exceptionless.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@
<PackageReference Include="NEST.JsonNetSerializer" Version="7.17.5" />
<PackageReference Include="Handlebars.Net" Version="2.1.6" />
<PackageReference Include="McSherry.SemanticVersioning" Version="1.4.1" />
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="8.0.2" />
<PackageReference Include="Microsoft.Extensions.Diagnostics.HealthChecks" Version="8.0.8" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="9.0.0-rc.2.24473.5" />
<PackageReference Include="Microsoft.Extensions.Diagnostics.HealthChecks" Version="9.0.0-rc.2.24474.3" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="9.0.0-rc.2.24473.5" />
<PackageReference Include="Stripe.net" Version="45.14.0" />
<PackageReference Include="System.DirectoryServices" Version="8.0.0" />
<PackageReference Include="System.DirectoryServices" Version="9.0.0-rc.2.24473.5" />
<PackageReference Include="UAParser" Version="3.1.47" />

<PackageReference Include="Foundatio.Repositories.Elasticsearch" Version="7.17.12" Condition="'$(ReferenceFoundatioRepositoriesSource)' == '' OR '$(ReferenceFoundatioRepositoriesSource)' == 'false'" />
Expand Down
12 changes: 6 additions & 6 deletions src/Exceptionless.Insulation/Exceptionless.Insulation.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
<PackageReference Include="Foundatio.Minio" Version="$(FoundatioVersion)" />
<PackageReference Include="Foundatio.RabbitMQ" Version="$(FoundatioVersion)" />
<PackageReference Include="Foundatio.Redis" Version="$(FoundatioVersion)" />
<PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" Version="8.0.1" />
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.DependencyModel" Version="8.0.1" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.1" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" Version="9.0.0-rc.2.24473.5" />
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="9.0.0-rc.2.24473.5" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="9.0.0-rc.2.24473.5" />
<PackageReference Include="Microsoft.Extensions.DependencyModel" Version="9.0.0-rc.2.24473.5" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="9.0.0-rc.2.24473.5" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="9.0.0-rc.2.24473.5" />
<PackageReference Include="MailKit" Version="4.7.1.1" />
<PackageReference Include="Serilog.Extensions.Logging" Version="8.0.0" />
<PackageReference Include="Serilog.Formatting.Compact" Version="3.0.0" />
Expand Down
2 changes: 1 addition & 1 deletion src/Exceptionless.Job/Exceptionless.Job.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<ItemGroup>
<PackageReference Include="Exceptionless.AspNetCore" Version="6.0.4" />
<PackageReference Include="Microsoft.Extensions.Diagnostics.HealthChecks" Version="8.0.8" />
<PackageReference Include="Microsoft.Extensions.Diagnostics.HealthChecks" Version="9.0.0-rc.2.24474.3" />
<PackageReference Include="App.Metrics.AspNetCore" Version="4.3.0" />
<PackageReference Include="Serilog.AspNetCore" Version="8.0.2" />
<PackageReference Include="Serilog.Enrichers.Span" Version="3.1.0" />
Expand Down
6 changes: 3 additions & 3 deletions src/Exceptionless.Web/Exceptionless.Web.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
<ItemGroup>
<PackageReference Include="Exceptionless.AspNetCore" Version="6.0.4" />
<PackageReference Include="Joonasw.AspNetCore.SecurityHeaders" Version="5.0.0" />
<PackageReference Include="Microsoft.AspNetCore.SpaProxy" Version="8.0.8" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="8.0.8" />
<PackageReference Include="Microsoft.Extensions.Diagnostics.HealthChecks" Version="8.0.8" />
<PackageReference Include="Microsoft.AspNetCore.SpaProxy" Version="9.0.0-rc.2.24474.3" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="9.0.0-rc.2.24474.3" />
<PackageReference Include="Microsoft.Extensions.Diagnostics.HealthChecks" Version="9.0.0-rc.2.24474.3" />
<PackageReference Include="MiniValidation" Version="0.9.1" />
<PackageReference Include="NEST.JsonNetSerializer" Version="7.17.5" />
<PackageReference Include="OAuth2" Version="0.10.3" />
Expand Down
4 changes: 2 additions & 2 deletions tests/Exceptionless.Tests/Exceptionless.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@

<PackageReference Include="FluentRest.NewtonsoftJson" Version="9.9.8" />

<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="8.0.8" />
<PackageReference Include="Microsoft.Extensions.TimeProvider.Testing" Version="8.9.1" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="9.0.0-rc.2.24474.3" />
<PackageReference Include="Microsoft.Extensions.TimeProvider.Testing" Version="9.0.0-preview.9.24507.7" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
<PackageReference Include="xunit" Version="2.9.2" />
<PackageReference Include="GitHubActionsTestLogger" Version="2.4.1" PrivateAssets="All" />
Expand Down

0 comments on commit dfe98b7

Please sign in to comment.