Skip to content

Raygun4Net.NetCore provider sends empty telemetry when .Net trimming is enabled #570

@gplwhite

Description

@gplwhite

Describe the bug
When a .Net Core application is published with trimming enabled, the telemetry messages sent to the Raygun api only contain the OccurredOn timestamp. No other data is sent.
The Raw Data tab in the Raygun dashboard shows the following was received:

{
  "OccurredOn": "2025-08-07T23:12:23.8553019Z"
}

To Reproduce
Steps to reproduce the behavior:

  1. Create a new .Net console application dotnet new console
  2. Add the Raygun Nuget package dotnet package add Mindscape.Raygun4Net.NetCore
  3. Add the following lines to the Program.cs
using Mindscape.Raygun4Net;
await new RaygunClient("API KEY HERE").SendAsync(new Exception("Log Message"));
  1. Add the following entries to the project file to enable trimming
<PropertyGroup>	
	<PublishTrimmed>true</PublishTrimmed>
	<TrimMode>full</TrimMode>
</PropertyGroup>
  1. Compile and publish the application dotnet publish
  2. Run the resulting executable
    Expected behavior
    A full set of metadata (including MachineName, VersionNumber, Exception information, Environment data) should be captured by the Raygun client and sent to the Raygun api

Additional context
Changing the TrimMode to partial <TrimMode>partial</TrimMode> results in the correct telemetry being sent.

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