Skip to content

Fix auto import of proto files when gRPC JSON transcoding is a transitive reference #52443

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

Merged
merged 1 commit into from
Nov 29, 2023

Conversation

JamesNK
Copy link
Member

@JamesNK JamesNK commented Nov 29, 2023

Fixes #52006

gRPC JSON transcoding has a Cool Trick to bundle proto files in the package and automatically include them in the proto compilation. This uses msbuild that is shipped with in the nuget package.

The msbuild file is in the package's /build directory, which means it doesn't run when Microsoft.AspNetCore.Grpc.JsonTranscoding is transitively referenced by the web app. The fix is to also put it in /buildTransitive.

The workaround to this issue is to add a direct reference to Microsoft.AspNetCore.Grpc.JsonTranscoding.

@JamesNK JamesNK added the area-grpc Includes: GRPC wire-up, templates label Nov 29, 2023
@JamesNK
Copy link
Member Author

JamesNK commented Nov 29, 2023

/azp run

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@JamesNK JamesNK merged commit 50f9cd6 into main Nov 29, 2023
@JamesNK JamesNK deleted the jamesnk/proto-include-transitive branch November 29, 2023 23:23
@ghost ghost added this to the 9.0-preview1 milestone Nov 29, 2023
@JamesNK
Copy link
Member Author

JamesNK commented Nov 30, 2023

/backport to release/8.0

Copy link
Contributor

Started backporting to release/8.0: https://github.com/dotnet/aspnetcore/actions/runs/7040803125

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-grpc Includes: GRPC wire-up, templates
Projects
None yet
Development

Successfully merging this pull request may close these issues.

IncludeHttpRuleProtos not working if not reference Microsoft.AspNetCore.Grpc.JsonTranscoding directly
2 participants