Skip to content

F# project and HTTP trigger leads to zero functions found #1685

@mattchenderson

Description

@mattchenderson

In testing #1684, I found my standard F# workflow was broken. This seems unrelated to those changes, as I can reproduce it with earlier versions as well. I recall that the last time I made a commit to this repo, that same workflow was fine. I don't see any related changes here that jump out as potentially causal. However, I'm filing it here because we need to confirm that end-to-end and see if we want to transfer it or open something in another repo.

To reproduce the issue:

  1. dotnet new uninstall Microsoft.Azure.Functions.Worker.ProjectTemplates
  2. dotnet new uninstall Microsoft.Azure.Functions.Worker.ItemTemplates
  3. dotnet new install Microsoft.Azure.Functions.Worker.ProjectTemplates (specify version if desired, or point to local build of this repo)
  4. dotnet new install Microsoft.Azure.Functions.Worker.ItemTemplates (specify version if desired, or point to local build of this repo)
  5. dotnet new func -F net9.0 -lang F# (it's the same across TFMs)
  6. dotnet new http -lang F# (note that this logs an error as it's unable to restore the package in the postAction, but it continues, as configured)
  7. (optional) dotnet restore and/or dotnet build
  8. dotnet run (or func host start)

Observe that the http function is not found. No functions are found.

From inspecting the build output, I can see that there is something wrong with the generated metadata. The functions.metadata file is just an empty array []. This makes me suspect something to do with the worker SDK, but it could be that the code we're scaffolding from the templates is wrong somehow.

I'm using the .NET 10 preview SDK. I did not try pinning back with global.json yet. That might be a good next step for subsequent investigation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions