Skip to content

.NET samples update for 03-Getting-Started #148

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

Merged
merged 8 commits into from
Jun 18, 2025

Conversation

justinyoo
Copy link
Contributor

Purpose

Describe the intention of the changes being proposed. What problem does it solve or functionality does it add?

I've reviewed the .NET sample apps under 03-GettingStarted and fixed some errors.

More reviews will come for 04-10

Does this introduce a breaking change?

When developers merge from main and run the server, azd up, or azd deploy, will this produce an error?
If you're not sure, try it out on an old environment.

[ ] Yes
[x] No

Does this require changes to learn.microsoft.com docs or modules?

which includes deployment, settings and usage instructions.

[ ] Yes
[x] No

Type of change

[ ] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[x] Documentation content changes
[x] Other... Please describe: .NET SDK version update + missing sample app added

@Copilot Copilot AI review requested due to automatic review settings June 18, 2025 05:08
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates the .NET samples under 03-GettingStarted to target .NET 9.0, modernizes package references, adds missing launch/solution files, and fixes sample app errors.

  • Upgraded target frameworks to net9.0 and switched to wildcard package versions
  • Added missing launchSettings.json for HTTP streaming and solution files for SSE and other samples
  • Refactored Program/README files to fix transport setup, async patterns, and restore/run steps

Reviewed Changes

Copilot reviewed 29 out of 29 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
03-GettingStarted/06-http-streaming/solution/dotnet/Properties/launchSettings.json Added launch settings for HTTP streaming
03-GettingStarted/06-http-streaming/solution/dotnet/Program.cs Configured MCP server with HTTP transport
03-GettingStarted/05-sse-server/solution/dotnet/server.sln Added solution file for SSE server sample
03-GettingStarted/05-sse-server/solution/dotnet/server.csproj Updated to net9.0 and wildcard package reference
03-GettingStarted/05-sse-server/solution/dotnet/Tools.cs Cleaned up constructor and awaited Task.FromResult
03-GettingStarted/05-sse-server/solution/dotnet/README.md Fixed install step and added SSE selection note
03-GettingStarted/05-sse-server/solution/dotnet/Program.cs Configured MCP server (SSE sample)
03-GettingStarted/04-vscode/solution/README.md Added <details> snippets for Node.js and .NET setups
03-GettingStarted/03-llm-client/solution/dotnet/dotnet.sln Added solution file for LLM client sample
03-GettingStarted/03-llm-client/solution/dotnet/dotnet.csproj Upgraded to net9.0 and wildcard package references
03-GettingStarted/03-llm-client/solution/dotnet/README.md Improved PAT environment setup instructions
03-GettingStarted/03-llm-client/solution/dotnet/Program.cs Added token check, path interpolation, and C#12 syntax
03-GettingStarted/02-client/solution/server/server.csproj Upgraded to net9.0 and wildcard package references
03-GettingStarted/02-client/solution/dotnet/dotnet.sln Added solution file for client sample
03-GettingStarted/02-client/solution/dotnet/dotnet.csproj Upgraded to net9.0 and wildcard package references
03-GettingStarted/02-client/solution/dotnet/README.md Added restore/run instructions
03-GettingStarted/02-client/solution/dotnet/Program.cs Refactored transport path and removed unused usings
03-GettingStarted/01-first-server/solution/dotnet/dotnet.sln Added solution file for first-server sample
03-GettingStarted/01-first-server/solution/dotnet/dotnet.csproj Upgraded to net9.0 and wildcard package references
03-GettingStarted/01-first-server/solution/dotnet/README.md Simplified install step to dotnet restore
Comments suppressed due to low confidence (2)

03-GettingStarted/05-sse-server/solution/dotnet/Program.cs:12

  • After building the app, you need to map endpoints and call app.Run();. Add app.MapMcp("/mcp"); and app.Run(); to start the server.
var app = builder.Build();

03-GettingStarted/02-client/solution/dotnet/Program.cs:1

  • The code references StdioClientTransport but the ModelContextProtocol.Protocol.Transport namespace was removed. Add using ModelContextProtocol.Protocol.Transport; to resolve this type.
using Microsoft.Extensions.Configuration;

@leestott leestott merged commit 073e290 into microsoft:main Jun 18, 2025
1 check passed
@justinyoo justinyoo deleted the chore/dotnet branch June 18, 2025 05:52
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