Skip to content

[10-preview.2] CS0673 error from XmlCommentGenerator #61019

Open
@martincostello

Description

@martincostello

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

Building an existing application with ASP.NET Core 10 preview 2 with XML documentation enabled, I get the following errors:

  API failed with 3 error(s) (7.4s)
    C:\Coding\martincostello\api\artifacts\obj\API\debug\Microsoft.AspNetCore.OpenApi.SourceGenerators\Microsoft.AspNetCore.OpenApi.SourceGenerators.XmlCommentGenerator\OpenApiXmlCommentSupport.generated.cs(304,152): error CS0673: System.Void cannot be used from C# -- use typeof(void) to get the void type object
    C:\Coding\martincostello\api\artifacts\obj\API\debug\Microsoft.AspNetCore.OpenApi.SourceGenerators\Microsoft.AspNetCore.OpenApi.SourceGenerators.XmlCommentGenerator\OpenApiXmlCommentSupport.generated.cs(304,203): error CS0246: The type or namespace name 'T' could not be found (are you missing a using directive or an assembly reference?)
    C:\Coding\martincostello\api\artifacts\obj\API\debug\Microsoft.AspNetCore.OpenApi.SourceGenerators\Microsoft.AspNetCore.OpenApi.SourceGenerators.XmlCommentGenerator\OpenApiXmlCommentSupport.generated.cs(313,169): error CS0673: System.Void cannot be used from C# -- use typeof(void) to get the void type object

Expected Behavior

The application compiles.

Steps To Reproduce

  1. Clone martincostello/api@c8e76ab
  2. Build the solution

Exceptions (if any)

No response

.NET Version

10.0.100-preview.2.25164.34

Anything else?

This looks similar to #60417, but that's closed and marked as fixed for preview 2, so I assume this is a different issue with the same symptom.

Metadata

Metadata

Assignees

Labels

area-minimalIncludes minimal APIs, endpoint filters, parameter binding, request delegate generator etcfeature-openapi

Type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions