diff --git a/.github/workflows/build-container.yml b/.github/workflows/build-container.yml index 4b1de1ba2c..542f645880 100644 --- a/.github/workflows/build-container.yml +++ b/.github/workflows/build-container.yml @@ -15,7 +15,6 @@ jobs: include: - base-image: alpine os-type: linux-musl - net-version: net8.0 runs-on: ubuntu-20.04 timeout-minutes: 60 steps: @@ -34,10 +33,10 @@ jobs: docker build -t mybuildimage -f "./docker/${{ matrix.base-image }}.dockerfile" ./docker docker run --mount type=bind,source="${GITHUB_WORKSPACE}",target=/project --rm mybuildimage /bin/sh -c ' set -e - dotnet publish -f ${{ matrix.net-version }} -c Release ./test/test-applications/integrations/TestApplication.Smoke + dotnet publish -f net8.0 -c Release ./test/test-applications/integrations/TestApplication.Smoke export OTEL_DOTNET_AUTO_HOME="${PWD}/bin/tracer-home" . ./instrument.sh - ./test/test-applications/integrations/bin/TestApplication.Smoke/Release/${{ matrix.net-version }}/publish/TestApplication.Smoke + ./test/test-applications/integrations/bin/TestApplication.Smoke/Release/net8.0/publish/TestApplication.Smoke test "$(ls -A /var/log/opentelemetry/dotnet )" ' - name: Publish Linux build diff --git a/build/Build.NuGet.Steps.cs b/build/Build.NuGet.Steps.cs index 0cb9a3e2d9..16bf01e55c 100644 --- a/build/Build.NuGet.Steps.cs +++ b/build/Build.NuGet.Steps.cs @@ -152,8 +152,8 @@ partial class Build string MapToNet8RuntimeIdentifiers(string oldRuntimeIdentifier) { #if NET8_0_OR_GREATER -// #error Remove method when _build.cproj starts targeting .NET8+ -#endif + return oldRuntimeIdentifier; +#else switch (oldRuntimeIdentifier) { case "ubuntu.20.04-x64": return "linux-x64"; @@ -161,6 +161,7 @@ string MapToNet8RuntimeIdentifiers(string oldRuntimeIdentifier) case "win10-x64": return "win-x64"; } throw new NotSupportedException($"{oldRuntimeIdentifier} is not supported. Extend MapToNet8RuntimeIdentifiers."); +#endif } foreach (var packagesTestApplicationProject in Solution.GetNuGetPackagesTestApplications()) diff --git a/build/Build.Steps.cs b/build/Build.Steps.cs index 3e24b3dfb0..82846ea773 100644 --- a/build/Build.Steps.cs +++ b/build/Build.Steps.cs @@ -48,7 +48,11 @@ partial class Build }; private static readonly IEnumerable TestFrameworks = TargetFrameworks - .Concat(TargetFramework.NET7_0, TargetFramework.NET8_0); + .Concat(TargetFramework.NET7_0 +#if NET8_0_OR_GREATER + , TargetFramework.NET8_0 +#endif + ); Target CreateRequiredDirectories => _ => _ .Unlisted() diff --git a/build/_build.csproj b/build/_build.csproj index 719c5ffcf8..864c4a7d9d 100644 --- a/build/_build.csproj +++ b/build/_build.csproj @@ -2,8 +2,8 @@ Exe - net7.0 - net8.0 + net8.0 + net7.0 CS0649;CS0169 ..\ diff --git a/docker/centos.dockerfile b/docker/centos.dockerfile index dfcc361945..8aa3c1f972 100644 --- a/docker/centos.dockerfile +++ b/docker/centos.dockerfile @@ -3,6 +3,7 @@ FROM ghcr.io/open-telemetry/opentelemetry-dotnet-instrumentation-centos7-build-i RUN rpm -Uvh https://packages.microsoft.com/config/centos/7/packages-microsoft-prod.rpm RUN yum -y install dotnet-sdk-6.0-6.0.415-1 dotnet-sdk-7.0-7.0.402-1 +ENV IsCentos=true WORKDIR /project COPY ./docker-entrypoint.sh / ENTRYPOINT ["/docker-entrypoint.sh"] diff --git a/examples/playground/AspNetCoreMvc/Examples.AspNetCoreMvc.csproj b/examples/playground/AspNetCoreMvc/Examples.AspNetCoreMvc.csproj index 9eae0cce0b..565adb653d 100644 --- a/examples/playground/AspNetCoreMvc/Examples.AspNetCoreMvc.csproj +++ b/examples/playground/AspNetCoreMvc/Examples.AspNetCoreMvc.csproj @@ -1,7 +1,8 @@  - net8.0;net7.0;net6.0 + net7.0;net6.0 + net8.0;$(TargetFrameworks) Examples.AspNetCoreMvc diff --git a/test/Directory.Build.props b/test/Directory.Build.props index d679c7021d..6b3d8e54ae 100644 --- a/test/Directory.Build.props +++ b/test/Directory.Build.props @@ -5,7 +5,8 @@ $(DefineConstants);DEFAULT_TEST_PACKAGE_VERSIONS - net8.0;net7.0;net6.0 + net7.0;net6.0 + net8.0;$(TargetFrameworks) $(TargetFrameworks);net462 diff --git a/test/OpenTelemetry.AutoInstrumentation.StartupHook.Tests/OpenTelemetry.AutoInstrumentation.StartupHook.Tests.csproj b/test/OpenTelemetry.AutoInstrumentation.StartupHook.Tests/OpenTelemetry.AutoInstrumentation.StartupHook.Tests.csproj index 101e3fe9d2..7cf6d5d9ea 100644 --- a/test/OpenTelemetry.AutoInstrumentation.StartupHook.Tests/OpenTelemetry.AutoInstrumentation.StartupHook.Tests.csproj +++ b/test/OpenTelemetry.AutoInstrumentation.StartupHook.Tests/OpenTelemetry.AutoInstrumentation.StartupHook.Tests.csproj @@ -1,7 +1,8 @@ - net8.0;net7.0;net6.0 + net7.0;net6.0 + net8.0;$(TargetFrameworks) diff --git a/test/test-applications/integrations/Integrations.props b/test/test-applications/integrations/Integrations.props index 3bbc475da3..837a0e229d 100644 --- a/test/test-applications/integrations/Integrations.props +++ b/test/test-applications/integrations/Integrations.props @@ -1,7 +1,8 @@ - net8.0;net7.0;net6.0 + net7.0;net6.0 + net8.0;$(TargetFrameworks) $(TargetFrameworks);net462 Exe diff --git a/test/test-applications/integrations/TestApplication.CustomSdk/TestApplication.CustomSdk.csproj b/test/test-applications/integrations/TestApplication.CustomSdk/TestApplication.CustomSdk.csproj index 9c1b962203..5496bbf5e2 100644 --- a/test/test-applications/integrations/TestApplication.CustomSdk/TestApplication.CustomSdk.csproj +++ b/test/test-applications/integrations/TestApplication.CustomSdk/TestApplication.CustomSdk.csproj @@ -2,7 +2,8 @@ Exe - net8.0;net7.0;net6.0 + net7.0;net6.0 + net8.0;$(TargetFrameworks) diff --git a/test/test-applications/integrations/TestApplication.EntityFrameworkCore.Pomelo.MySql/TestApplication.EntityFrameworkCore.Pomelo.MySql.csproj b/test/test-applications/integrations/TestApplication.EntityFrameworkCore.Pomelo.MySql/TestApplication.EntityFrameworkCore.Pomelo.MySql.csproj index 591fa5e3f0..38a7417f98 100644 --- a/test/test-applications/integrations/TestApplication.EntityFrameworkCore.Pomelo.MySql/TestApplication.EntityFrameworkCore.Pomelo.MySql.csproj +++ b/test/test-applications/integrations/TestApplication.EntityFrameworkCore.Pomelo.MySql/TestApplication.EntityFrameworkCore.Pomelo.MySql.csproj @@ -1,7 +1,8 @@  - net8.0;net7.0;net6.0 + net7.0;net6.0 + net8.0;$(TargetFrameworks) diff --git a/test/test-applications/integrations/TestApplication.EntityFrameworkCore/TestApplication.EntityFrameworkCore.csproj b/test/test-applications/integrations/TestApplication.EntityFrameworkCore/TestApplication.EntityFrameworkCore.csproj index 84d9954769..b23d896569 100644 --- a/test/test-applications/integrations/TestApplication.EntityFrameworkCore/TestApplication.EntityFrameworkCore.csproj +++ b/test/test-applications/integrations/TestApplication.EntityFrameworkCore/TestApplication.EntityFrameworkCore.csproj @@ -1,7 +1,8 @@  - net8.0;net7.0;net6.0 + net7.0;net6.0 + net8.0;$(TargetFrameworks) diff --git a/test/test-applications/integrations/TestApplication.GraphQL/TestApplication.GraphQL.csproj b/test/test-applications/integrations/TestApplication.GraphQL/TestApplication.GraphQL.csproj index b132916882..2568b2a516 100644 --- a/test/test-applications/integrations/TestApplication.GraphQL/TestApplication.GraphQL.csproj +++ b/test/test-applications/integrations/TestApplication.GraphQL/TestApplication.GraphQL.csproj @@ -1,7 +1,8 @@  - net8.0;net7.0;net6.0 + net7.0;net6.0 + net8.0;$(TargetFrameworks) diff --git a/test/test-applications/integrations/TestApplication.Http/TestApplication.Http.csproj b/test/test-applications/integrations/TestApplication.Http/TestApplication.Http.csproj index 9de915f986..bf2bd03f13 100644 --- a/test/test-applications/integrations/TestApplication.Http/TestApplication.Http.csproj +++ b/test/test-applications/integrations/TestApplication.Http/TestApplication.Http.csproj @@ -1,7 +1,8 @@  - net8.0;net7.0;net6.0 + net7.0;net6.0 + net8.0;$(TargetFrameworks) diff --git a/test/test-applications/integrations/TestApplication.Logs/TestApplication.Logs.csproj b/test/test-applications/integrations/TestApplication.Logs/TestApplication.Logs.csproj index 1b512612b6..e4c605f33e 100644 --- a/test/test-applications/integrations/TestApplication.Logs/TestApplication.Logs.csproj +++ b/test/test-applications/integrations/TestApplication.Logs/TestApplication.Logs.csproj @@ -1,7 +1,8 @@ - net8.0;net7.0;net6.0 + net7.0;net6.0 + net8.0;$(TargetFrameworks) diff --git a/test/test-applications/integrations/TestApplication.NServiceBus/TestApplication.NServiceBus.csproj b/test/test-applications/integrations/TestApplication.NServiceBus/TestApplication.NServiceBus.csproj index d8bbebb718..8e20aa908d 100644 --- a/test/test-applications/integrations/TestApplication.NServiceBus/TestApplication.NServiceBus.csproj +++ b/test/test-applications/integrations/TestApplication.NServiceBus/TestApplication.NServiceBus.csproj @@ -1,7 +1,8 @@ - net8.0;net7.0;net6.0 + net7.0;net6.0 + net8.0;$(TargetFrameworks) $(TargetFrameworks);net472 diff --git a/test/test-applications/integrations/TestApplication.Quartz/TestApplication.Quartz.csproj b/test/test-applications/integrations/TestApplication.Quartz/TestApplication.Quartz.csproj index ed99cdcd23..5915064f9e 100644 --- a/test/test-applications/integrations/TestApplication.Quartz/TestApplication.Quartz.csproj +++ b/test/test-applications/integrations/TestApplication.Quartz/TestApplication.Quartz.csproj @@ -1,7 +1,8 @@  - net8.0;net7.0;net6.0 + net7.0;net6.0 + net8.0;$(TargetFrameworks) $(TargetFrameworks);net472 $(DefineConstants);QUARTZ_3_7_0_OR_GREATER diff --git a/test/test-applications/integrations/TestApplication.Razor/Properties/launchSettings.json b/test/test-applications/integrations/TestApplication.Razor/Properties/launchSettings.json new file mode 100644 index 0000000000..e8b277ea4a --- /dev/null +++ b/test/test-applications/integrations/TestApplication.Razor/Properties/launchSettings.json @@ -0,0 +1,12 @@ +{ + "profiles": { + "TestApplication.Razor": { + "commandName": "Project", + "launchBrowser": true, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + }, + "applicationUrl": "https://localhost:53389;http://localhost:53390" + } + } +} \ No newline at end of file diff --git a/test/test-applications/integrations/TestApplication.Razor/TestApplication.Razor.csproj b/test/test-applications/integrations/TestApplication.Razor/TestApplication.Razor.csproj index 1b512612b6..e4c605f33e 100644 --- a/test/test-applications/integrations/TestApplication.Razor/TestApplication.Razor.csproj +++ b/test/test-applications/integrations/TestApplication.Razor/TestApplication.Razor.csproj @@ -1,7 +1,8 @@ - net8.0;net7.0;net6.0 + net7.0;net6.0 + net8.0;$(TargetFrameworks) diff --git a/test/test-applications/integrations/TestApplication.Wcf.Client.DotNet/TestApplication.Wcf.Client.DotNet.csproj b/test/test-applications/integrations/TestApplication.Wcf.Client.DotNet/TestApplication.Wcf.Client.DotNet.csproj index a905a7dad3..807de1ce7f 100644 --- a/test/test-applications/integrations/TestApplication.Wcf.Client.DotNet/TestApplication.Wcf.Client.DotNet.csproj +++ b/test/test-applications/integrations/TestApplication.Wcf.Client.DotNet/TestApplication.Wcf.Client.DotNet.csproj @@ -1,7 +1,8 @@  - net8.0;net7.0;net6.0 + net7.0;net6.0 + net8.0;$(TargetFrameworks) diff --git a/test/test-applications/nuget-packages/Directory.Build.props b/test/test-applications/nuget-packages/Directory.Build.props index da2be821e8..e7c6b77e5f 100644 --- a/test/test-applications/nuget-packages/Directory.Build.props +++ b/test/test-applications/nuget-packages/Directory.Build.props @@ -5,7 +5,8 @@ - net8.0;net7.0;net6.0 + net7.0;net6.0 + net8.0;$(TargetFrameworks) $(TargetFrameworks);net462 enable diff --git a/tools/DependencyListGenerator/DependencyListGenerator.csproj b/tools/DependencyListGenerator/DependencyListGenerator.csproj index 97b2dc21a8..9e867165fa 100644 --- a/tools/DependencyListGenerator/DependencyListGenerator.csproj +++ b/tools/DependencyListGenerator/DependencyListGenerator.csproj @@ -1,8 +1,8 @@  - net7.0 - net8.0 + net8.0 + net7.0 enable disable