Minmal .NET API - Delegate 'RequestDelegate' does not take 0 arguments #34390
Labels
area-minimal
Includes minimal APIs, endpoint filters, parameter binding, request delegate generator etc
feature-minimal-actions
Controller-like actions for endpoint routing
✔️ Resolution: Answered
Resolved because the question asked by the original author has been answered.
Status: Resolved
Milestone
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 :
The text was updated successfully, but these errors were encountered: