Skip to content

PublishAot is breaking the aspnetcore sample app #214

Closed
@chuckries

Description

@chuckries

Describe the bug
configuring the AspNetCoreSseServer sample for PublishAot causes default json serialization to not allow reflection which breaks the tool descriptor generation. This causes the app to thrown exception on launch

To Reproduce
Steps to reproduce the behavior:

  1. Open sln
  2. Set AspNetCoreSseServer sample project as startup project
  3. Launch under debugger

Exception is thrown:
System.NotSupportedException: 'JsonTypeInfo metadata for type 'ModelContextProtocol.Server.IMcpServer' was not provided by TypeInfoResolver of type 'Microsoft.Extensions.AI.AIJsonUtilities+JsonContext'.

Expected behavior
Server launches

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions