Skip to content

Issue with System.Diagnostics ActivitySource when consuming .net8.0 nuget. #2428

Description

@antokhio

Hi, I'm trying to make use this in vvvv
The vvvv uses .net8.0 natively

So if i use 1.8.0 I get issue with kind of simple code:

_actorSystem = new ActorSystem();
var config = RemoteConfig.BindTo(host, port);
_remote = new GrpcNetRemote(_actorSystem, config);

_remote?.StartAsync().Wait();  // TextSystem.MissingMethodException: 'Method not found: 'Void System.Diagnostics.ActivitySource..ctor(System.String)'.'

So upon narrowing this down I found that issue happens if:

using System.Diagnostics;

var ass = new ActivitySource("Test") ;

I first thought that this is some sort of dependency race condition, with System.Diagnostics.DiagnosticSource or Microsoft.Extensions.Logging.Abstractions , but the thing is that System.Diagnostics is something that is provided by .net?

If I fallback to 1.7.0 I don't have this issue anymore.
Investigating hosting also.

The weird thing if just try above line on host environment there is no issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions