Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion .ci/windows/dotnet.bat
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,9 @@ dotnet sln remove test/Elastic.Apm.StartupHook.Tests/Elastic.Apm.StartupHook.Tes
:: Remove profiler tests, which are tested separately- require profiler to be built
dotnet sln remove test/Elastic.Apm.Profiler.Managed.Tests/Elastic.Apm.Profiler.Managed.Tests.csproj

dotnet build -c Release --verbosity detailed
dotnet nuget locals all --clear

dotnet nuget add source --name nuget.org https://api.nuget.org/v3/index.json

:: Build solution. Add `--verbosity detailed` for more detailed logs
Copy link
Contributor Author

@gregkalapos gregkalapos Jan 25, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Took out verbose logging - it turned out to generate huge noise when I need to look at logs from a failed build. I'd prefer to keep it without verbose logs and only turn it on once we really need it.

dotnet build -c Release
2 changes: 1 addition & 1 deletion .ci/windows/msbuild-tools.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ $ErrorActionPreference = "Stop"

# Install visualstudio2019 and workloads needed to build ASP.NET and .NET Core apps
Invoke-WebRequest -UseBasicParsing `
-Uri "https://download.visualstudio.microsoft.com/download/pr/cb1d5164-e767-4886-8955-2df3a7c816a8/b9ff67da6d68d6a653a612fd401283cc213b4ec4bae349dd3d9199659a7d9354/vs_BuildTools.exe" `
-Uri "https://download.visualstudio.microsoft.com/download/pr/ce8663b0-08ed-410a-9f5d-4f9469d1b2cb/73271b3d53a4e50e65e2e918a8c1100d2681c17bc418e03513c9f0554609ff8a/vs_BuildTools.exe" `
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This updates it to the vs 2022 version.

-OutFile "C:\tools\vs_BuildTools.exe"

Start-Process "C:\tools\vs_BuildTools.exe" -ArgumentList "--add", "Microsoft.VisualStudio.Component.NuGet", `
Expand Down
2 changes: 1 addition & 1 deletion .ci/windows/msbuild.bat
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
:: This script runs the msbuild
::
echo "Prepare context for VsDevCmd.bat"
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\Common7\Tools\VsDevCmd.bat"
call "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\Common7\Tools\VsDevCmd.bat"

dotnet nuget add source --name nuget.org https://api.nuget.org/v3/index.json
nuget restore -verbosity detailed -NonInteractive
Expand Down
22 changes: 21 additions & 1 deletion .ci/windows/test.bat
Original file line number Diff line number Diff line change
@@ -1,8 +1,28 @@
::
:: This script runs the dotnet build without the Full Framework projects
::
dotnet sln remove sample/AspNetFullFrameworkSampleApp/AspNetFullFrameworkSampleApp.csproj
dotnet sln remove src/Elastic.Apm.AspNetFullFramework/Elastic.Apm.AspNetFullFramework.csproj
dotnet sln remove test/Elastic.Apm.AspNetFullFramework.Tests/Elastic.Apm.AspNetFullFramework.Tests.csproj
dotnet sln remove test/Elastic.Apm.SqlClient.Tests/Elastic.Apm.SqlClient.Tests.csproj
dotnet sln remove test/Elastic.Apm.EntityFramework6.Tests/Elastic.Apm.EntityFramework6.Tests.csproj
dotnet sln remove test/Elastic.Apm.MongoDb.Tests/Elastic.Apm.MongoDb.Tests.csproj

:: Remove startup hooks tests, which are tested separately- require agent zip to be built
dotnet sln remove test/Elastic.Apm.StartupHook.Tests/Elastic.Apm.StartupHook.Tests.csproj

:: Remove profiler tests, which are tested separately- require profiler to be built
dotnet sln remove test/Elastic.Apm.Profiler.Managed.Tests/Elastic.Apm.Profiler.Managed.Tests.csproj

:: TODO: Test only - building this seems to fail
dotnet sln remove test/Elastic.Apm.StaticImplicitInitialization.Tests/Elastic.Apm.StaticImplicitInitialization.Tests.csproj
dotnet sln remove test/Elastic.Apm.StaticExplicitInitialization.Tests/Elastic.Apm.StaticExplicitInitialization.Tests.csproj

::
:: This script runs the tests and stored them in an xml file defined in the
:: LogFilePath property
::
dotnet test -c Release --no-build ^
dotnet test -c Release ^
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Out of curiosity, if the test.bat does also run the build, are the dotnet sln remove needed for the building?

Copy link
Contributor Author

@gregkalapos gregkalapos Jan 25, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that's intentional.

Those projects that we remove with dotnet sln remove need more than what we have in this context (e.g. ASP.NET Classic), so the dotnet tool isn't enough for those. We use those projects in the Windows .NET Framework stage.

I only know this from experience. If we don't remove those, it'll fail - I saw it :) . Prior to this PR removing happened in the dotnet.bat file.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Greg for the clarification :)

--verbosity normal ^
--results-directory target ^
--diag target\diag.log ^
Expand Down
7 changes: 4 additions & 3 deletions .ci/windows/tools.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,14 @@ Add-WindowsFeature Web-Asp-Net45
# Install .Net SDKs
Write-Host "Install .Net SDKs"
choco install dotnetcore-sdk -m -y --no-progress -r --version 2.1.505
choco install dotnetcore-sdk -m -y --no-progress -r --version 2.2.104
choco install dotnetcore-sdk -m -y --no-progress -r --version 2.2.402
choco install dotnetcore-sdk -m -y --no-progress -r --version 3.0.103
choco install dotnetcore-sdk -m -y --no-progress -r --version 3.1.100
choco install dotnetcore-sdk -m -y --no-progress -r --version 3.1.416
choco install dotnet-sdk -m -y --no-progress -r --version 5.0.100
choco install dotnet-sdk -m -y --no-progress -r --version 6.0.101

# Install NuGet Tool
choco install nuget.commandline -y --no-progress -r --version 5.8.0
choco install nuget.commandline -y --no-progress -r --version 6.0.0

# Install vswhere
choco install vswhere -y --no-progress -r --version 2.8.4
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -360,3 +360,4 @@ target/
Cargo.lock
expanded.rs

test/Elastic.Apm.Feature.Tests/SpecFlow/userid
4 changes: 1 addition & 3 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -358,9 +358,6 @@ pipeline {
unstash 'source'
dir("${BASE_DIR}"){
powershell label: 'Install test tools', script: '.ci\\windows\\test-tools.ps1'
retry(3) {
bat label: 'Build', script: '.ci/windows/dotnet.bat'
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of building it once and then running test.bat in a separate step we can do the whole thing in test.bat.

}
withAzureCredentials(path: "${HOME}", credentialsFile: '.credentials.json') {
bat label: 'Test & coverage', script: '.ci/windows/test.bat'
}
Expand Down Expand Up @@ -624,6 +621,7 @@ def dotnet(Closure body){
./dotnet-install.sh --install-dir "\${DOTNET_ROOT}" -version '3.0.103'
./dotnet-install.sh --install-dir "\${DOTNET_ROOT}" -version '3.1.100'
./dotnet-install.sh --install-dir "\${DOTNET_ROOT}" -version '5.0.100'
./dotnet-install.sh --install-dir "\${DOTNET_ROOT}" -version '6.0.100'
""")
withAzureCredentials(path: "${homePath}", credentialsFile: '.credentials.json') {
withTerraform(){
Expand Down
2 changes: 1 addition & 1 deletion build/scripts/ReleaseNotes.fs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ module ReleaseNotes =
("uncategorized", "Uncategorized")
]
uncategorized = "uncategorized"
};
}

let private groupByLabel (config: Config) (items: List<GitHubItem>) =
let dict = Dictionary<string, GitHubItem list>()
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": "5.0.100",
"version": "6.0.100",
"rollForward": "latestFeature",
"allowPrerelease": false
}
Expand Down
10 changes: 9 additions & 1 deletion sample/SampleAspNetCoreApp/SampleAspNetCoreApp.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFrameworks>netcoreapp2.1;netcoreapp3.0;netcoreapp3.1;net5.0</TargetFrameworks>
<TargetFrameworks>netcoreapp2.1;netcoreapp3.0;netcoreapp3.1;net5.0;net6.0</TargetFrameworks>
<IsPackable>false</IsPackable>
</PropertyGroup>

Expand All @@ -26,6 +26,14 @@
<PackageReference Include="OpenTelemetry.Instrumentation.AspNetCore" Version="1.0.0-rc6"/>
<PackageReference Include="OpenTelemetry.Extensions.Hosting" Version="1.0.0-rc6"/>
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net6.0' ">
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="6.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="6.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Identity.UI" Version="6.0.0" />
<PackageReference Include="OpenTelemetry.Instrumentation.AspNetCore" Version="1.0.0-rc6"/>
<PackageReference Include="OpenTelemetry.Extensions.Hosting" Version="1.0.0-rc6"/>
<PackageReference Include="Microsoft.Extensions.Logging" Version="6.0.0" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
</ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions sample/SampleAspNetCoreApp/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public static void ConfigureServicesExceptMvc(IServiceCollection services)
}

// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
#if NETCOREAPP3_0 || NETCOREAPP3_1 || NET5_0
#if NETCOREAPP3_0 || NETCOREAPP3_1 || NET5_0 || NET6_0
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
#else
public void Configure(IApplicationBuilder app, IHostingEnvironment env)
Expand All @@ -79,7 +79,7 @@ public static void ConfigureAllExceptAgent(IApplicationBuilder app)

public static void ConfigureRoutingAndMvc(IApplicationBuilder app)
{
#if NETCOREAPP3_0 || NETCOREAPP3_1 || NET5_0
#if NETCOREAPP3_0 || NETCOREAPP3_1 || NET5_0 || NET6_0
app.UseRouting();

app.UseAuthentication();
Expand Down
4 changes: 2 additions & 2 deletions sample/WebApiSample/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public void ConfigureServices(IServiceCollection services) =>


// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
#if NETCOREAPP3_0 || NETCOREAPP3_1 || NET5_0
#if NETCOREAPP3_0 || NETCOREAPP3_1 || NET5_0 || NET6_0
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
#else
public void Configure(IApplicationBuilder app, IHostingEnvironment env)
Expand All @@ -39,7 +39,7 @@ public static void ConfigureAllExceptAgent(IApplicationBuilder app)

app.UseHttpsRedirection();

#if NETCOREAPP3_0 || NETCOREAPP3_1 || NET5_0
#if NETCOREAPP3_0 || NETCOREAPP3_1 || NET5_0 || NET6_0
app.UseRouting();

app.UseEndpoints(endpoints => { endpoints.MapControllers(); });
Expand Down
2 changes: 1 addition & 1 deletion sample/WebApiSample/WebApiSample.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFrameworks>netcoreapp2.1;netcoreapp3.0;netcoreapp3.1;net5.0</TargetFrameworks>
<TargetFrameworks>netcoreapp2.1;netcoreapp3.0;netcoreapp3.1;net5.0;net6.0</TargetFrameworks>
<IsPackable>false</IsPackable>
</PropertyGroup>

Expand Down
2 changes: 1 addition & 1 deletion src/Elastic.Apm/Elastic.Apm.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<PackageId>Elastic.Apm</PackageId>
<Description>Elastic APM .NET Agent base package. This package provides core functionality for transmitting of all Elastic APM types and is a dependent package for all other Elastic APM package. Additionally this package contains the public Agent API that allows you to manually capture transactions and spans. Please install the platform specific package for the best experience. See: https://github.com/elastic/apm-agent-dotnet/tree/main/docs</Description>
<PackageTags>apm, monitoring, elastic, elasticapm, analytics, sdk</PackageTags>
<LangVersion>latest</LangVersion>
<LangVersion>9</LangVersion>
</PropertyGroup>
<ItemGroup>
<InternalsVisibleTo Include="DynamicProxyGenAssembly2" Key="0024000004800000940000000602000000240000525341310004000001000100c547cac37abd99c8db225ef2f6c8a3602f3b3606cc9891605d02baa56104f4cfc0734aa39b93bf7852f7d9266654753cc297e7d2edfe0bac1cdcf9f717241550e0a7b191195b7667bb4f64bcb8e2121380fd1d9d46ad2d92d2d15605093924cceaf74c4861eff62abf69b9291ed0a340e113be11e6a7d3113e92484cf7045cc7" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFrameworks>netcoreapp2.1;netcoreapp3.0;netcoreapp3.1;net5.0</TargetFrameworks>
<TargetFrameworks>netcoreapp2.1;netcoreapp3.0;netcoreapp3.1;net5.0;net6.0</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="FluentAssertions" Version="5.6.0" />
Expand All @@ -27,6 +27,10 @@
<ItemGroup Condition=" '$(TargetFramework)' == 'net5.0' ">
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="5.0.0" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net6.0' ">
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Configuration" Version="6.0.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\Elastic.Apm.AspNetCore\Elastic.Apm.AspNetCore.csproj" />
<ProjectReference Include="..\..\src\Elastic.Apm\Elastic.Apm.csproj" />
Expand Down
12 changes: 8 additions & 4 deletions test/Elastic.Apm.AspNetCore.Tests/AspNetCoreBasicTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,12 @@ public async Task HomeSimplePageTransactionTest(bool withDiagnosticSourceOnly)
_agent.Service.Framework.Version.Should().Be(aspNetCoreVersion);
#if NET5_0
_agent.Service.Runtime.Name.Should().Be(Runtime.DotNetName + " 5");
#elif NET6_0
_agent.Service.Runtime.Name.Should().Be(Runtime.DotNetName + " 6");
#else
_agent.Service.Runtime.Name.Should().Be(Runtime.DotNetCoreName);
#endif
_agent.Service.Runtime.Version.Should().Be(Directory.GetParent(typeof(object).Assembly.Location).Name);
_agent.Service.Runtime.Version.Should().StartWith(Directory.GetParent(typeof(object).Assembly.Location).Name);

var transaction = _capturedPayload.FirstTransaction;
var transactionName = $"{response.RequestMessage.Method} Home/SimplePage";
Expand All @@ -125,7 +127,7 @@ public async Task HomeSimplePageTransactionTest(bool withDiagnosticSourceOnly)
}

//test transaction.context.request
#if NET5_0
#if NET5_0 || NET6_0
transaction.Context.Request.HttpVersion.Should().Be("1.1");
#elif NETCOREAPP3_0 || NETCOREAPP3_1
transaction.Context.Request.HttpVersion.Should().Be("2");
Expand Down Expand Up @@ -247,11 +249,13 @@ public async Task HomeSimplePagePostTransactionTest(bool withDiagnosticSourceOnl

#if NET5_0
_agent.Service.Runtime.Name.Should().Be(Runtime.DotNetName + " 5");
#elif NET6_0
_agent.Service.Runtime.Name.Should().Be(Runtime.DotNetName + " 6");
#else
_agent.Service.Runtime.Name.Should().Be(Runtime.DotNetCoreName);
#endif

_agent.Service.Runtime.Version.Should().Be(Directory.GetParent(typeof(object).Assembly.Location).Name);
_agent.Service.Runtime.Version.Should().StartWith(Directory.GetParent(typeof(object).Assembly.Location).Name);


_capturedPayload.Transactions.Should().ContainSingle();
Expand Down Expand Up @@ -279,7 +283,7 @@ public async Task HomeSimplePagePostTransactionTest(bool withDiagnosticSourceOnl
}

//test transaction.context.request
#if NET5_0
#if NET5_0 || NET6_0
transaction.Context.Request.HttpVersion.Should().Be("1.1");
#elif NETCOREAPP3_0 || NETCOREAPP3_1
transaction.Context.Request.HttpVersion.Should().Be("2");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ public async Task DisposeAsync()
/// <returns></returns>
private async Task ExecuteAndCheckDistributedCall(bool startActivityBeforeHttpCall = true)
{
#if NET5_0
#if NET5_0 || NET6_0
// .NET 5 has built-in W3C TraceContext support and Activity uses the W3C id format by default (pre .NET 5 it was opt-in)
// This means if there is no active activity, the outgoing HTTP request on HttpClient will add the traceparent header with
// a flag recorded=false. The agent would pick this up on the incoming call and start an unsampled transaction.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFrameworks>netcoreapp2.1;netcoreapp3.0;netcoreapp3.1;net5.0</TargetFrameworks>
<TargetFrameworks>netcoreapp2.1;netcoreapp3.0;netcoreapp3.1;net5.0;net6.0</TargetFrameworks>
<AssemblyName>Elastic.Apm.AspNetCore.Tests</AssemblyName>
<RootNamespace>Elastic.Apm.AspNetCore.Tests</RootNamespace>
</PropertyGroup>
Expand Down Expand Up @@ -36,6 +36,11 @@
<ItemGroup Condition=" '$(TargetFramework)' == 'net5.0' ">
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="5.0.0" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net6.0' ">
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Configuration" Version="6.0.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\Elastic.Apm.AspNetCore\Elastic.Apm.AspNetCore.csproj" />
<ProjectReference Include="..\..\src\Elastic.Apm\Elastic.Apm.csproj" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>netcoreapp3.1;net5.0</TargetFrameworks>
<TargetFrameworks>netcoreapp3.1;net5.0;net6.0</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
Expand All @@ -28,6 +28,10 @@
<PackageReference Include="Microsoft.Extensions.Hosting" Version="5.0.0" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net6.0'">
<PackageReference Include="Microsoft.Extensions.Hosting" Version="6.0.0" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp3.1'">
<PackageReference Include="Microsoft.Extensions.Hosting" Version="3.1.5" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>netcoreapp3.1;net5.0</TargetFrameworks>
<TargetFrameworks>netcoreapp3.1;net5.0;net6.0</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
Expand All @@ -28,6 +28,10 @@
<PackageReference Include="Microsoft.Extensions.Hosting" Version="5.0.0" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net6.0'">
<PackageReference Include="Microsoft.Extensions.Hosting" Version="6.0.0" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp3.1'">
<PackageReference Include="Microsoft.Extensions.Hosting" Version="3.1.5" />
</ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions test/Elastic.Apm.SqlClient.Tests/EfCoreWithMsSqlTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ public void BothEfCoreAndSqlClientCapturingActive()
_apmAgent.Tracer.CaptureTransaction("transaction", "type", transaction =>
{
// ReSharper disable once AccessToDisposedClosure
var firstItemInDb = context.SampleTable.First();
Debug.WriteLine(firstItemInDb.StrField);
var firstItemInDb = context.SampleTable.FirstOrDefault();
Debug.WriteLine(firstItemInDb?.StrField);
});

_payloadSender.SpansOnFirstTransaction.Should().HaveCount(1);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netcoreapp3.1;net5.0</TargetFrameworks>
<TargetFrameworks>netcoreapp3.1;net5.0;net6.0</TargetFrameworks>
</PropertyGroup>

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

<PropertyGroup>
<TargetFrameworks>netcoreapp3.1;net5.0</TargetFrameworks>
<TargetFrameworks>netcoreapp3.1;net5.0;net6.0</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion test/Elastic.Apm.Tests/ConfigTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ public void ReadServerUrlsWithSpaceAtTheEndViaEnvironmentVariable()
var payloadSender = new MockPayloadSender();
using (var agent = new ApmAgent(new TestAgentComponents(payloadSender: payloadSender, configuration: new EnvironmentConfigurationReader())))
{
#if !NETCOREAPP3_0 && !NETCOREAPP3_1 && !NET5_0
#if !NETCOREAPP3_0 && !NETCOREAPP3_1 && !NET5_0 && !NET6_0
agent.ConfigurationReader.ServerUrls.First().Should().NotBe(serverUrlsWithSpace);
agent.ConfigurationReader.ServerUrl.Should().NotBe(serverUrlsWithSpace);
#endif
Expand Down
2 changes: 1 addition & 1 deletion test/Elastic.Apm.Tests/Elastic.Apm.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netcoreapp2.1;netcoreapp3.0;netcoreapp3.1;net461;net5.0</TargetFrameworks>
<TargetFrameworks>netcoreapp2.1;netcoreapp3.0;netcoreapp3.1;net461;net5.0;net6.0</TargetFrameworks>
</PropertyGroup>

<PropertyGroup>
Expand Down