-
Notifications
You must be signed in to change notification settings - Fork 881
Description
Is your feature request related to a problem? Please describe.
Yes, there is an issue with being able to use the new C# extensions:
public static class MyExtension
{
extension (IServiceCollection services)
{
public Result DoSomeCoolExtensionThing()
{
.....
}
}
}
I've seen errors relating to the following when attempting to run run: docfx docfx.json in CI/CD style pipelines in Github Actions:
error CS1520: Method must have a return type
error CS0710: Static classes cannot have instance constructors
error CS0708: '{memberName}': cannot declare instance members in a static class
Describe the solution you'd like
The new C# language features for extensions should not bork builds
Describe alternatives you've considered
Using standard extension with the older language features. This will work, but it's not staying modern.
Additional context
N/A
Note: If this is user error or something else I'm unaware of, let me know. Happy to close the issue due to ignorance on my part.