Comments (2)
If someone have the same issue, here come the solution :
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Grpc" Version="2.28.1" />
<PackageReference Include="Grpc.Tools" Version="2.28.1">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Google.Api.CommonProtos" Version="2.0.0" />
<Protobuf Include="protobuf/as/**/*.proto" ProtoRoot="protobuf" OutputDir="protos.local/as/%(RelativePath)" GrpcServices="Client" CompileOutputs="false" />
<Protobuf Update="protobuf/as/**/frameLog.proto;protobuf/as/**/profiles.proto;protobuf/as/**/integration.proto" GrpcServices="None" />
<Protobuf Include="protobuf/common/**/*.proto" ProtoRoot="protobuf" OutputDir="protos.local/common/%(RelativePath)" GrpcServices="None" CompileOutputs="false" />
<Protobuf Include="protobuf/geo/**/*.proto" ProtoRoot="protobuf" OutputDir="protos.local/geo/%(RelativePath)" GrpcServices="None" CompileOutputs="false" />
<Protobuf Include="protobuf/gw/**/*.proto" ProtoRoot="protobuf" OutputDir="protos.local/gw/%(RelativePath)" GrpcServices="None" CompileOutputs="false" />
<Protobuf Include="protobuf/nc/**/*.proto" ProtoRoot="protobuf" OutputDir="protos.local/nc/%(RelativePath)" GrpcServices="None" CompileOutputs="false" />
<Protobuf Include="protobuf/ns/**/*.proto" ProtoRoot="protobuf" OutputDir="protos.local/ns/%(RelativePath)" GrpcServices="None" CompileOutputs="false" />
</ItemGroup>
</Project>
It's important to not generate the C# objects for the google's proto but include them in the tree and reference the Google.Api.CommonProtos
as said here https://github.com/googleapis/api-common-protos#packages
from chirpstack-api.
An exemple of my project :
Chirpstack.Client.csproj
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Google.Api.CommonProtos" Version="2.0.0" />
<PackageReference Include="Grpc" Version="2.28.1" />
<PackageReference Include="Grpc.Tools" Version="2.28.1">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
</ItemGroup>
<ItemGroup>
<Protobuf Include="protobuf/**/*.proto" ProtoRoot="protobuf" OutputDir="protos.local/%(RelativePath)" CompileOutputs="Both" />
</ItemGroup>
</Project>
And the errors :
Google.Protobuf.Tools.targets(313,5): warning : Some expected protoc outputs were not generated.
protos.local/FrameLogGrpc.cs
protos.local/ProfilesGrpc.cs
...
protos.local/Http.cs(490,47): warning CS0436: The type 'HttpRule' in '***/ChirpStack.Client/protos.local/Http.cs' conflicts with the imported type 'HttpRule' in 'Google.Api.CommonProtos, Version=2.0.0.0, Culture=neutral, PublicKeyToken=3ec5ea7f18953e47'. Using the type defined in '***/ChirpStack.Client/protos.local/Http.cs'. [***/ChirpStack.Client/ChirpStack.Client.csproj]
protos.local/ServiceProfile.cs(733,25): error CS0234: The type or namespace name 'ServiceProfile' does not exist in the namespace 'Api'
Half of the errors maybe because of this grpc/grpc#17672
from chirpstack-api.
Related Issues (20)
- Cannot read property 'createInsecure' of undefined
- /api/organizations feature or issue ? HOT 2
- Put version string in one place
- Wish list: Update API and associated projects to Go protobuf V2 HOT 3
- Is the fuota.proto usable in Python? It's currently missing from the standard package
- Fix js/README.md / migrate user JWT to api-key JWT token HOT 2
- io.chirpstack
- uplinkID in UplinkRXInfo is parsed wrong as json
- Tags and Variables returned in Get /api/devices request
- Add support for PHP
- Gateway frames stream HOT 4
- java api HOT 1
- Recent UplinkEvent changes not reflected in website event examples
- api generation in python betterproto format HOT 2
- Add C# namespace HOT 1
- Python installation of chirpstack-api does not include as_pb and other folders HOT 2
- Error message of "EnqueueMulticastGroupQueueItemRequest()" using python gRPC
- setTagsMap? HOT 1
- Use of eval in google-protobuf.js HOT 2
- Upgrade com.google.protobuf version from 3.21.3 to 4.26.1 in java subproject
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from chirpstack-api.