Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move to a single top-level file #2

Merged
merged 2 commits into from
Feb 25, 2021
Merged

Conversation

cartermp
Copy link
Contributor

This compiles, but fails at runtime with:

Building...
Unhandled exception. System.InvalidOperationException: Action must have a pattern. Is it missing a Route attribute?
   at Microsoft.AspNetCore.Builder.MapActionEndpointRouteBuilderExtensions.MapAction(IEndpointRouteBuilder endpoints, Delegate action)
   at Program.main(String[] args) in /Users/phillip/repos/HoudiniPlaygroundFSharp/Program.fs:line 18

@halter73
Copy link
Owner

Love it! I went a bit into the reason for the error in #1 (comment)

I would have thought #1 had a better chance of working since it's constructing the Funcs with a direct reference to a method on the Startup class/type, though this looks a lot better. If we could make reasonable MethodInfos out of locally define functions that would be amazing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants