Description
I get an error when I'm trying to publish an assembly:
Trim analysis error IL2080: BeforeCommitDomainEventPublisher.d__5.MoveNext(): 'this' argument does not satisfy 'DynamicallyAccessedMemberTypes.All' in call to 'System.Type.InvokeMember(String, BindingFlags, Binder, Object, Object[])'. The field
'System.ValueTuple<T1,T2>.Item1' does not have matching annotations. The source value must declare at least the same requirements as those declared on the target location it is assigned to.
However, analyzer does not emit any warnings when building the project (dotnet build /p:PublishTrimmed=true
), yet I have TreatWarningsAsErrors=true
.
What can be the reason for it?
Project is targeting .NET, I see ILLink.RoslynAnalyzer among referenced analyzers, severity for IL2080 is set to error.