Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IGrpcServiceActivator missing DynamicallyAccessedMembers attribute on its generic argument type #1470

Closed
gitfool opened this issue Nov 4, 2021 · 1 comment · Fixed by #1471
Labels
bug Something isn't working

Comments

@gitfool
Copy link

gitfool commented Nov 4, 2021

What version of gRPC and what language are you using?

gRPC 2.37.0 and C#

What operating system (Linux, Windows,...) and version?

Linux (Ubuntu 20.04) and Windows (10 21H1)

What runtime / compiler are you using (e.g. .NET Core SDK version dotnet --info)

.NET SDK 6.0.100-rc.2.21505.57

What did you do?

See pulumi/pulumi#8153 (comment) for background.

TL;DR: Simply retargeting from net5.0 to net6.0 hit an issue with linker trimming of single file executable:

Generic implementation type 'Grpc.AspNetCore.Server.Internal.DefaultGrpcServiceActivator`1' has a DynamicallyAccessedMembers attribute applied to a generic argument type, but the service type
'Grpc.AspNetCore.Server.IGrpcServiceActivator`1' doesn't have a matching DynamicallyAccessedMembers attribute on its generic argument type.

If I understand correctly, it looks like this is not fixed in the latest source as IGrpcServiceActivator still does not have the DynamicallyAccessedMembers attribute as in DefaultGrpcServiceActivator.

@gitfool gitfool added the bug Something isn't working label Nov 4, 2021
@JamesNK
Copy link
Member

JamesNK commented Nov 8, 2021

Thanks for reporting this. It is fixed in the next gRPC release. A preview should be released soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants