Conversation
Add a console application that references all three library packages (ModelContextProtocol.Core, ModelContextProtocol, ModelContextProtocol.AspNetCore) and is published with PublishAot=true. This ensures that any AOT/trimming warnings from the libraries are caught during CI, following the pattern from dotnet/extensions. Co-authored-by: stephentoub <[email protected]>
Replace the minimal "Success!" print with a full client-server round-trip test using in-memory pipes, matching the InMemoryTransport sample pattern. The test creates a server with an Echo tool, connects a client, lists tools, invokes the Echo tool, and verifies the result. Co-authored-by: stephentoub <[email protected]>
eiriktsarpalis
left a comment
There was a problem hiding this comment.
@stephentoub I have had success using TUnit for Native AOT smoke testing in my personal projects. It lets you execute the code and assertions on the AOT runtime and you can exercise multiple scenaria because they're written as standard unit tests.
eerhardt
left a comment
There was a problem hiding this comment.
I just had 1 comment. The rest of the changes look good.
We could look at doing something more in the future. For now, I'm happy to just do what we do elsewhere. |
Co-authored-by: eiriktsarpalis <[email protected]>
Head branch was pushed to by a user without write access
Co-authored-by: stephentoub <[email protected]>
|
@copilot please update the makefile to verify that the published app prints "Success!" and that its exit code is 0 |
Co-authored-by: stephentoub <[email protected]>
|
@copilot remove the grep |
Co-authored-by: stephentoub <[email protected]>

tests/ModelContextProtocol.AotCompatibility.TestApp/console app project withPublishAot=truethat references all three library projectsProgram.cswith client-server sanity test using in-memory pipes (Echo tool round-trip)ModelContextProtocol.slnxsolution fileci-build-test.yml)test-aotMakefile target for quick local testingtest-aotto also run the published AOT binary and verify it succeedsdotnet publishwith AOT succeeds without warningsOriginal prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.