xmldoc file detection by assembly from a referenced project
@commonsensesoftware is already working on this.
Since Sep 5, 2026.
Assessment
This issue has not been assessed yet.
Description
Is there an existing issue for this?
- I have searched the existing issues
Describe the bug
I have an issue with xmldocs and assemblies in a situation similar to #1175
.AddApiVersioning.AddOpenApi()is in a Library.csproj- Running code is in
App.csproj, which imports the library - BOTH csproj have xmldoc generation enabled
GetAssemblies behaves like this:
callingAssembly = Library
entryAssembly = App
assemblyList = [Library, App]
// assembly list is passed to XmlCommentsFile constructor
for(var i in assemblies)
if file.exists() return // first wins
so XmlCommentsTransformer ends up with Library.xml instead of App.xml
by the way, is there any documentation on how xmldocs are loaded for referenced projects, nuget packages, etc? i searched for aspnet openapi (not versioned) and they have an unresolved issue that .AddOpenApi triggers an interceptor so this call must be placed in the app directly, not in nuget or other csproj. does versioned openapi do anything about this? i'm asking because it's not clear what default expected behavior should be, and how to customize it, eg load xmldocs for all referenced assemblies if it's not by default.
from the looks of XmlCommentsTransformer there is only one path where xmldoc is loaded from, and service registration does not allow for multiple xml transformers. XmlCommentsFile is internal so it's impossible to register it and pass assemblies directly
Expected Behavior
xmldocs should be loaded for application, all referenced projects and nugets
Steps To Reproduce
No response
Exceptions (if any)
No response
.NET Version
10.0.200
Anything else?
No response
- Dominant language
- C#
- Stars
- 3.2k
- Forks
- 721
- PR merge metrics
- No merged PRs in 30d
Getting set up
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from dotnet/aspnet-api-versioning
-
Stay backwards compatible within major versionPossibly taken @commonsensesoftware claimed this 1 day ago. Openbug triage
dotnet/aspnet-api-versioning#1230 · 1 comment · 1 assignee ·
-
VersionedOpenApiOptionsFactory race: concurrent document requests cause NullReferenceException or unconfigured documentPossibly taken @commonsensesoftware claimed this 9 days ago. Openbug triage
dotnet/aspnet-api-versioning#1228 · 1 assignee ·
-
InvalidOperationException when create schema on transformerPossibly taken @commonsensesoftware claimed this 9 days ago. Openasp.net core triage
dotnet/aspnet-api-versioning#1227 · 1 assignee ·
-
.NET 11 RC - AOT Mode - System.NotSupportedException: ElementType is not initialized when `Microsoft.AspNetCore.Mvc.ApiExplorer.IsEnhancedModelMetadataSupported` is false.Possibly taken @commonsensesoftware claimed this 9 days ago. Openbug triage
dotnet/aspnet-api-versioning#1226 · 1 comment · 1 assignee ·
-
Feature request: declarative attribute for endpoints introduced in a specific API versionMay be free again @commonsensesoftware claimed this 53 days ago, and no pull request is open. Openasp.net core enhancement
dotnet/aspnet-api-versioning#1183 · 7 comments · 1 assignee ·
All issues in dotnet/aspnet-api-versioning
Similar issues
-
agentic-workflows area/Docs partner/agentic-workflows
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
microsoft/fluentui-blazor#5364 ·
Maintainers usually reply within 1 day
-
.NET triage
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
microsoft/agent-framework#8811 ·
Maintainers usually reply within 1 day
-
.NET Docs
Difficulty 1/5 Under an hour Newbie friendliness 82/100
getsentry/sentry-dotnet#5637 · 1 comment ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
QuantConnect/Lean#9842 ·
Maintainers usually reply within 1 day