-
Notifications
You must be signed in to change notification settings - Fork 10.7k
Minmal .NET API - Delegate 'RequestDelegate' does not take 0 arguments #34390
Copy link
Copy link
Closed
Labels
✔️ Resolution: AnsweredResolved because the question asked by the original author has been answered.Resolved because the question asked by the original author has been answered.Status: Resolvedarea-minimalIncludes minimal APIs, endpoint filters, parameter binding, request delegate generator etcIncludes minimal APIs, endpoint filters, parameter binding, request delegate generator etcfeature-minimal-actionsController-like actions for endpoint routingController-like actions for endpoint routing
Milestone
Metadata
Metadata
Assignees
Labels
✔️ Resolution: AnsweredResolved because the question asked by the original author has been answered.Resolved because the question asked by the original author has been answered.Status: Resolvedarea-minimalIncludes minimal APIs, endpoint filters, parameter binding, request delegate generator etcIncludes minimal APIs, endpoint filters, parameter binding, request delegate generator etcfeature-minimal-actionsController-like actions for endpoint routingController-like actions for endpoint routing
Type
Fields
Give feedbackNo fields configured for issues without a type.
I'm trying to test out creating a minimal .NET Core API, with a very simple structure. e.g. :
I seem to get the following error :
I checked for other issues inside this repo, and the only similar mention was when the cast was removed from the delegate here : #33393
Because previously you had to cast to a Func like so (And this does get my code compiling without errors).
If I run my code using dotnet run, the code actually runs fine and generates a response. So I'm thinking it could be more about the tooling I'm using, but I'm not sure where.
I have the latest .NET Core 6 - Preview 6 SDK :
My VS Code version is :
My VS Code C# extension version is 1.23.13
My Visual Studio 2019 is version 16.10.3 (But not preview, which could be the issue)
So again :