Skip to content
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

[Feature Request] dotnet API link to a specific version? #10040

Open
bohyunjung opened this issue Jun 26, 2024 · 2 comments
Open

[Feature Request] dotnet API link to a specific version? #10040

bohyunjung opened this issue Jun 26, 2024 · 2 comments
Labels
dotnet Generate .NET API reference docs

Comments

@bohyunjung
Copy link

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

I build markdown files (#10039) out of the Unity Package projects (#9719) and need the dotnet APIs to be linked to a specific version. (In my case that's netframework-4.8.1.)

That is

  • I currently get the links like this:
    • [object](https://learn.microsoft.com/dotnet/api/system.object)
  • But I need the links with the specified version:
    • [object](https://learn.microsoft.com/dotnet/api/system.object&view=netframework-4.8.1)

However I could not find the way to achieve this; so I wrote a post-processing logic which finds a pattern match, then replaces strings.

Describe the solution you'd like

I would love to have an option that specifies the version of the dotnet API version, which is simply gonna be a query parameter added to the generated URL (view=netframework-4.8.1)

OR making it possible to format the dotnet API URL string, in the manner of xref template rendering should be nice as well.

Additional context

Here's the docfx.json I use.

docfx.json
{
    "metadata": [
        {
            "src": [
                {
                    "src": "..",
                    "files": [
                        "**/*.cs"
                    ]
                }
            ],
            "dest": "api",
            "globalNamespaceId": "Global",
            "allowCompilationErrors": true,
            "namespaceLayout": "flattened",
            "outputFormat": "markdown",
            "filter": "filterConfig.yml"
        }
    ]
}
@yufeih yufeih added the dotnet Generate .NET API reference docs label Jul 1, 2024
@yufeih
Copy link
Contributor

yufeih commented Jul 1, 2024

We might be able to auto detect target version based on info in csproj or DLL.

@bohyunjung
Copy link
Author

@yufeih That's a great idea.
Specifying the version while leaving it auto-detected by default may still be handy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dotnet Generate .NET API reference docs
Projects
None yet
Development

No branches or pull requests

2 participants