Skip to content

PublishAot warning with TUnit 0.21.13 #2458

@AArnott

Description

@AArnott

This isn't the same as #2410, as the warning is different:

Nerdbank.MessagePack.TUnit succeeded with 1 warning(s) (130.6s) → bin\Nerdbank.MessagePack.TUnit\Debug\net9.0\win-x64\publish
C:\Users\andarno.nuget\packages\tunit.core\0.21.13\lib\net9.0\TUnit.Core.dll : warning IL2104: Assembly 'TUnit.Core' produced trim warnings. For more information see https://aka.ms/il2104

Repro details
<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <OutputType>Exe</OutputType>
    <SelfContained>true</SelfContained>
    <PublishAot>true</PublishAot>
    <InvariantGlobalization>true</InvariantGlobalization>
    <RuntimeIdentifiers>$(AvailableRuntimeIdentifiers)</RuntimeIdentifiers>
    <RuntimeIdentifier>$(DefaultRuntimeIdentifier)</RuntimeIdentifier>
    <TargetFramework>net9.0</TargetFramework>
  </PropertyGroup>

  <ItemGroup>
    <PackageReference Include="Microsoft.CodeAnalysis.CSharp.CodeFix.Testing.XUnit" />
    <PackageReference Include="TUnit.Engine" />
    <PackageReference Include="xunit.v3.assert" />
  </ItemGroup>

</Project>
<PackageVersion Include="TUnit.Engine" Version="0.21.13" />

dotnet publish -r win-x64

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions