Skip to content

Conversation

@abeltrano
Copy link
Contributor

Type

  • Bug fix
  • Feature addition
  • Feature update
  • Documentation
  • Build Infrastructure

Side Effects

  • Breaking change
  • Non-functional change

Goals

Add support for packaging and distributing the NetRemote .proto APIs as a .NET NuGet package (Microsoft.Net.Remote.Client). This enables .NET consumers to easily reference the NetRemote gRPC services without manually compiling proto files.

Additionally, reorganize the .NET project structure to improve clarity and maintainability:

  • Consolidate API bindings under /api/dotnet/
  • Move tests to appropriate test directories
  • Remove unused/incomplete .NET projects

Technical Details

NuGet Package (api/dotnet/):

  • Created SDK-style .csproj targeting netstandard2.1 for broad compatibility (.NET Core 3.0+, .NET 5+)
  • Pre-compiles all proto files using Grpc.Tools at build time
  • Includes raw .proto files in package for consumers who need them
  • Cross-platform build scripts (build.sh, build.ps1)
  • CMake integration for building via cmake --build . --target nuget-pack

Project Structure Cleanup:

  • Moved .NET API bindings from /packaging/nuget/ to /api/dotnet/ (co-located with /api/protos/ and /api/protocol/)
  • Removed /src/common/dotnet/NetRemoteClient/ (replaced by /api/dotnet/)
  • Removed /src/common/dotnet/NetRemoteService/ (unimplemented stub)
  • Relocated unit tests to /tests/integration/dotnet/ and renamed to reflect their nature as integration tests
  • Removed ARM32 and x86 platform configurations from all .NET projects

CI/CD Integration:

  • Added .github/workflows/dotnet-tests.yml workflow for .NET builds and tests
  • Runs on both Ubuntu and Windows
  • Builds NuGet package and uploads as artifact
  • Integrated into main CI/CD pipeline via cicd.yml

Test Results

Verified .NET integration tests pass:

  • dotnet test passes on Linux (net8.0)
  • dotnet build succeeds for NuGet package
  • dotnet pack creates valid .nupkg

Reviewer Focus

Please review:

  • The package structure in /api/dotnet/ - especially the proto file references and NuGet packaging configuration
  • The GitHub Actions workflow for completeness and correctness
  • Whether the integration test coverage is sufficient

Future Work

  • Publish NuGet package to a package feed (nuget.org or GitHub Packages)
  • Add more comprehensive integration tests that verify gRPC communication
  • Consider adding a separate protos-only NuGet package for maximum flexibility

Checklist

  • Build target all compiles cleanly.
  • clang-format and clang-tidy deltas produced no new output.
  • Newly added functions include doxygen-style comment block.

@abeltrano abeltrano requested a review from a team as a code owner January 31, 2026 01:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants