-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Closed
Copy link
Labels
area-minimalIncludes minimal APIs, endpoint filters, parameter binding, request delegate generator etcIncludes minimal APIs, endpoint filters, parameter binding, request delegate generator etcfeature-openapi
Milestone
Description
Is there an existing issue for this?
- I have searched the existing issues
Describe the bug
Relates to #60977 (comment).
Using the latest nightly build for .NET 10 preview 3, I get the following error trying to compile a test project that generates XML documentation where the tests depend on an library which references Microsoft.AspNetCore.OpenApi:
C:\Coding\martincostello\openapi-extensions\artifacts\obj\MartinCostello.OpenApi.Extensions.Tests\release_net10.0\Microsoft.AspNetCore.OpenApi.SourceGenerators\Microsoft.AspNetCore.OpenApi.SourceGenerators.XmlCommentGenerator\OpenApiXmlCommentSupport.generated.cs(188,99): error CS0122: 'XmlCommentsHelperTests.SomeClass' is inaccessible due to its protection level
The types causing the error are private nested types of a public test class.
To get that far I also had to add <InterceptorsNamespaces>$(InterceptorsNamespaces);Microsoft.AspNetCore.OpenApi.Generated</InterceptorsNamespaces>.
The raises a few questions:
- Isn't the need to add
InterceptorsNamespacesredundant these days? - Should the source generator be flowing transitively?
- Should the source generator ignore projects where
IsTestProject=true?
Expected Behavior
The project compiles.
Steps To Reproduce
- Clone martincostello/openapi-extensions@6b686d9
- Build the solution
Exceptions (if any)
No response
.NET Version
10.0.100-preview.3.25169.19
Anything else?
No response
Metadata
Metadata
Assignees
Labels
area-minimalIncludes minimal APIs, endpoint filters, parameter binding, request delegate generator etcIncludes minimal APIs, endpoint filters, parameter binding, request delegate generator etcfeature-openapi