Skip to content

ILLink analyzer hole for deconstruction assignments #123767

Description

@voroninp

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.
image

Metadata

Metadata

Assignees

Labels

area-Tools-ILLink.NET linker development as well as trimming analyzers

Type

No type

Projects

Status
No status

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions