Closed eerhardt closed 1 year ago
Tagging subscribers to this area: @dotnet/area-extensions-dependencyinjection See info in area-owners.md if you want to be subscribed.
Author: | eerhardt |
---|---|
Assignees: | - |
Labels: | `area-Extensions-DependencyInjection` |
Milestone: | - |
You can probably work around by putting the suppression on the getter. We likely don't look at the associated property.
Cc @dotnet/ilc-contrib
We likely don't look at the associated property.
Note that the property below the one getting the warning is annotated the same way, and we aren't getting a warning for it. https://github.com/dotnet/runtime/blob/ae70a1c51a334a5e13fa22d500f8a8390052eef5/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/IEnumerableCallSite.cs#L29-L32
This is the next bug I'm going to look at (hopefully today)... just please bear with me a little :wink:
Summary
I'm getting an unexpected ILC warning when publishing an app that uses DependencyInjection.
However, this property has a suppression on it, so the warning shouldn't be emitted.
https://github.com/dotnet/runtime/blob/ae70a1c51a334a5e13fa22d500f8a8390052eef5/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/IEnumerableCallSite.cs#L24-L27
Repro Steps
dotnet publish
the following app(Note: in order to use the pre-release DependencyInjection package, you need a nuget.config for .NET 8 feed. Follow the instructions in https://github.com/dotnet/installer#installers-and-binaries)
Expected results
There should be no warnings.
Actual results
I get the warning as above.