Skip to content

AddDownstreamApis method produces IL warnings when consumed from other NativeAOT enabled projects #3360

@GeoK

Description

@GeoK

Microsoft.Identity.Web Library

Microsoft.Identity.Web.DownstreamApi

Microsoft.Identity.Web version

3.8.4

Web app

Not Applicable

Web API

Not Applicable

Token cache serialization

Not Applicable

Description

Invoking AddDownstreamApis method results in IL2026/IL3050 warnings.
Even though source generator for configuration binding is enabled on IdentityModel.DownstreamApi project, the generator can't run on a reference to the Bind method.
Bind needs to be actually invoked directly in the code as a workaround.

Reproduction steps

services.AddDownstreamApis(configuration);

Error message

No response

Id Web logs

No response

Relevant code snippets

services.AddDownstreamApis(configuration);

Regression

No response

Expected behavior

No IL2026/IL3050 warnings.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions