Enable AOT compatibility for Yarp.Kubernetes.Controller #3010
Azure Pipelines / microsoft-reverse-proxy-ci (Build Windows)
failed
Apr 8, 2026 in 3m 36s
Build Windows failed
Annotations
azure-pipelines / microsoft-reverse-proxy-ci (Build Windows)
src\Kubernetes.Controller\Management\KubernetesReverseProxyServiceCollectionExtensions.cs#L83
src\Kubernetes.Controller\Management\KubernetesReverseProxyServiceCollectionExtensions.cs(83,46): error IL3050: (NETCORE_ENGINEERING_TELEMETRY=Build) Using member 'Microsoft.Extensions.Configuration.ConfigurationBinder.Bind(IConfiguration, Object)' which has 'RequiresDynamicCodeAttribute' can break functionality when AOT compiling. Binding strongly typed objects to configuration values requires generating dynamic code at runtime, for example instantiating generic types.
azure-pipelines / microsoft-reverse-proxy-ci (Build Windows)
src\Kubernetes.Controller\Management\KubernetesReverseProxyServiceCollectionExtensions.cs#L83
src\Kubernetes.Controller\Management\KubernetesReverseProxyServiceCollectionExtensions.cs(83,46): error IL2026: (NETCORE_ENGINEERING_TELEMETRY=Build) Using member 'Microsoft.Extensions.Configuration.ConfigurationBinder.Bind(IConfiguration, Object)' which has 'RequiresUnreferencedCodeAttribute' can break functionality when trimming application code. Cannot statically analyze the type of instance so its members may be trimmed.
azure-pipelines / microsoft-reverse-proxy-ci (Build Windows)
src\Kubernetes.Controller\Management\KubernetesReverseProxyServiceCollectionExtensions.cs#L115
src\Kubernetes.Controller\Management\KubernetesReverseProxyServiceCollectionExtensions.cs(115,16): error IL2091: (NETCORE_ENGINEERING_TELEMETRY=Build) 'TService' generic argument does not satisfy 'DynamicallyAccessedMemberTypes.PublicConstructors' in 'Microsoft.Extensions.DependencyInjection.KubernetesReverseProxyServiceCollectionExtensions.RegisterResourceInformer<TResource, TService>(IServiceCollection, String)'. The generic parameter 'TService' of 'Microsoft.Extensions.DependencyInjection.KubernetesReverseProxyServiceCollectionExtensions.RegisterResourceInformer<TResource, TService>(IServiceCollection)' 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.
Loading