OpenAPITools / OpenAPITools/openapi-generator

[REQ] Cross-platform build csharp-dotnet2 clients

Open
#2,672 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Enhancement: Feature
Dominant language
Java
Stars
26.8k
Forks
7.7k
PR merge metrics
PR metrics pending

Description

Is your feature request related to a problem? Please describe.

Currently, the csharp-dotnet2 clients are not generated with a csproj inside it. Although it provides a Mono-based build script that downloads the nuget.exe, pulls the dependencies and builds the client library, this approach has the following problems:

  • It's not the standard/recommended way of building .NET libraries
  • It requires downloading an extra executable
  • It requires a platform emulator
  • It lacks support for Windows at the moment, as stated in the generated README file

Describe the solution you'd like

I'd like to purpose adding a csproj file to the generated csharp-dotnet2 client, so it can be used by the .NET SDK for:

  • Building the code and generating the necessary DLLs in the specified target platform and runtimes (cross-platform).
  • Automatically pull the specified dependencies without making it explicit.
  • Generating and deploying a NuGet package without requiring a nuspec file.

Note: With this change, the packages.config and the compile-mono.sh are no longer necessary so they can also be removed from the generated clients.

Describe alternatives you've considered

N/A

Additional context

N/A

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Locate the generator templates or output path for the csharp-dotnet2 client, then inspect the generated packages.config, compile-mono.sh, and README. Confirm how dependencies and build outputs are currently handled; done means generated clients include a usable csproj for cross-platform SDK builds and NuGet packaging, while obsolete files are removed.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
build-system
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.