Skip to content

AOT compilation produces single trim analysis warning #1942

Closed
@DavidZidar

Description

@DavidZidar

Bug

Which library version?

6.0.0

What are the platform(s), environment(s) and related component version(s)?

.NET 7 and .NET 8 preview 4

What is the use case or problem?

I am AOT-publishing a small application that is using System.Reactive and I'm getting a single trim analysis warning.

What is the expected outcome?

No warnings.

What is the actual outcome?

ILC : Trim analysis warning IL2057: System.Reactive.PlatformServices.CurrentPlatformEnlightenmentProvider.GetService<T>(Object[]): Unrecognized value passed to the parameter 'typeName' of method 'System.Type.GetType(String,Boolean)'. It's not possible to guarantee the availability of the target type.

Other than the warning it seems to work fine.

Related question

Is AOT supposed to be supported? I see that the IsTrimmable flag is set to true but the warning I get makes me uncertain.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions