Open sakamoto-poteko opened 4 years ago
We don't currently support scaffolding with GRPC/Protobuf generator. Will look into it for the future.
For anyone looking for a workaround: I commented out/temporarily remove all codes/files referencing protobuf generated classes. This can be quite tedious in large project though.
Hello ! Any news on this subject ? I have the exact same problem. I think I'm not the only one to start a project on .NET and want to use gRPC.
Steps to reproduce:
Grpc.Net.Client
,Google.Protobuf
andGrpc.Tools
dotnet aspnet-codegenerator identity -fi Account.Register -dc ScaffoldingAndGrpc.Data.ApplicationDbContext
The code was uploaded to https://github.com/sakamoto-poteko/ScaffoldingAndGrpcBug
Expected behavior:
Generate scaffolded identity codes.
Actual behavior:
App successfully builds and runs. However, when scaffolding identity, it fails with output "Failed to compile the project in memory", indicating protobuf generated classes are not found.
Additional information about the project being scaffolded
Target framework(s):
.Net Core 3.1
Package version of Microsoft.AspNetCore.App or Microsoft.AspNetCore.All (if applicable):
Package version of Microsoft.VisualStudio.Web.CodeGeneration.Design - this may be added to your project by scaffolding:
3.1.1