Skip to content

Conversation

@sbomer
Copy link
Member

@sbomer sbomer commented Apr 7, 2025

The generated code currently produces a trim warning at k.ContainingType.GetProperty:

ValidatableInfoResolver.g.cs(263,32): error IL2075: 'this' argument does not satisfy 'DynamicallyAccessedMemberTypes.PublicProperties' in call to 'System.Type.GetProperty(String)'. The return value of method 'Microsoft.AspNetCore.Http.Validation.Generated.ValidationAttributeCache.CacheKey.ContainingType.get' 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.

@ghost ghost added the area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions label Apr 7, 2025
@BrennanConroy
Copy link
Member

Seems like we should have a linker/aot verification test.
e.g. https://github.com/dotnet/aspnetcore/blob/main/src/SignalR/server/SignalR/test/Microsoft.AspNetCore.SignalR.Tests/NativeAotTests.cs

@dotnet-policy-service dotnet-policy-service bot added the pending-ci-rerun When assigned to a PR indicates that the CI checks should be rerun label Apr 15, 2025
@captainsafia
Copy link
Member

I opened #61927 to update the snapshot tests since the original branch didn't let me push.

I still kept your commit @sbomer so you'll get credit for the change.

@sbomer sbomer closed this May 23, 2025
@dotnet-policy-service dotnet-policy-service bot added this to the 10.0-preview6 milestone May 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions pending-ci-rerun When assigned to a PR indicates that the CI checks should be rerun

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants