Skip to content

func pack errors in custom handler project because 'functions.metadata' not found #4677

@lilyjma

Description

@lilyjma

Version

4.3.0

Description

Running func pack in a custom handler errors because 'functions.metadata' not found in deployment structure. The custom handler is an mcp server, and has FWR set to dotnet-isolated. Running dotnet publish as suggested doesn't help -

local.settings.json found in root directory (/Users/lily/Desktop/Functions/mcp/functions-hosting/test/mcp-sdk-functions-hosting-dotnet).
Resolving worker runtime to 'dotnet-isolated'.
local.settings.json found in root directory (/Users/lily/Desktop/Functions/mcp/functions-hosting/test/mcp-sdk-functions-hosting-dotnet).
Resolving worker runtime to 'dotnet-isolated'.
 
Validating project...
 
  Validate host.json: PASSED
 
Building .NET project...
  Determining projects to restore...
  All projects are up-to-date for restore.
  QuickstartWeatherServer -> /Users/lily/Desktop/Functions/mcp/functions-hosting/test/mcp-sdk-functions-hosting-dotnet/bin/Release/net8.0/QuickstartWeatherServer.dll
  QuickstartWeatherServer -> /Users/lily/Desktop/Functions/mcp/functions-hosting/test/mcp-sdk-functions-hosting-dotnet/output/
 
 
Validating published output...
  Validate Published Structure: FAILED
    Required file 'functions.metadata' not found in deployment structure. Ensure 'dotnet publish' has been run.
Published output validation failed: Required file 'functions.metadata' not found in deployment structure. Ensure 'dotnet publish' has been run.

FYI @im-samz

Steps to reproduce

  1. Clone this repo: https://github.com/Azure-Samples/mcp-sdk-functions-hosting-dotnet
  2. Run func pack in the root

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions