Skip to content

[BUG]: System.Runtime.InteropServices.MarshalDirectiveException error: Cannot marshal 'parameter #1': Cannot marshal managed types when the runtime marshalling system is disabled #6710

Open
@svirchenko

Description

@svirchenko

Tracer Version(s)

3.11.0

Operating system and platform

Windows (x64)

Instrumentation Mode

Datadog.Trace.Bundle

TFM

net8

Bug Report

Hi there,

I am getting the following error "ITCompilationStarted: Startup hook registered in function_id=140723489709512 token=100663622 name=System.Security.AccessControl.NativeObjectSecurity..ctor(), assembly_name=System.Security.AccessControl app_domain_id=2522716116512 domain_neutral=0 02/25/25 11:12:57.773 AM [3044|37884] [error] An error occured in the managed loader: System.Runtime.InteropServices.MarshalDirectiveException: Cannot marshal 'parameter #1': Cannot marshal managed types when the runtime marshalling system is disabled. at DDVoidMethodType.GetAssemblyAndSymbolsBytes(IntPtr&, Int32&, IntPtr&, Int32&) at DDVoidMethodType.DDInvokeLoader() at DDVoidMethodType.DDVoidMethodCall()" in the "dotnet-tracer-native" log file for Datadog.Trace.Bundle.

Can you guide how to fix it? This is ASP NET Core worker service with net8.0.

Many thanks,
serhii

Reproduction Code

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions