Skip to content

Instantly share code, notes, and snippets.

@ismaelhamed
Created November 17, 2021 07:30
Show Gist options
  • Save ismaelhamed/fcc18ba7ffed9c31cddaa4cc98aefdda to your computer and use it in GitHub Desktop.
Save ismaelhamed/fcc18ba7ffed9c31cddaa4cc98aefdda to your computer and use it in GitHub Desktop.
Elastic.Apm.Extensions.Hosting dependecies mismatch
using Elastic.Apm.DiagnosticSource;
using Elastic.Apm.Extensions.Hosting;
using Microsoft.Extensions.Hosting;
namespace Sample
{
internal static class Program
{
private static void Main(string[] args)
{
CreateHostBuilder(args).Build().Run();
}
public static IHostBuilder CreateHostBuilder(string[] args) =>
Host.CreateDefaultBuilder(args)
.UseElasticApm(new HttpDiagnosticsSubscriber());
}
}
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net48</TargetFramework>
<OutputType>Exe</OutputType>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Elastic.Apm.Extensions.Hosting" Version="1.12.1" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="5.0.0" />
</ItemGroup>
</Project>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment