-
Notifications
You must be signed in to change notification settings - Fork 545
Add devcontainer.json to support .NET 9 samples in GitHub Codespaces #779
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
Conversation
@eiriktsarpalis 👋 This repository doesn't have Copilot instructions. With Copilot instructions, I can understand the repository better, work faster and produce higher quality PRs. I can generate a .github/copilot-instructions.md file for you automatically. Click here to open a pre-filled issue and assign it to me. I'll write the instructions, and then tag you for review. |
…espaces Co-authored-by: eiriktsarpalis <[email protected]>
…ostCreateCommand Co-authored-by: eiriktsarpalis <[email protected]>
Tested the codespace and it appears to be working now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good but I think there are a couple small improvements we should make.
Co-authored-by: eiriktsarpalis <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! 👍
Sample projects in this repository that target .NET 9 (such as
EverythingServer
,AspNetCoreMcpServer
,ProtectedMcpServer
, etc.) were failing to build or run in GitHub Codespaces with the error:The root cause was that GitHub Codespaces' default container includes .NET 8 LTS but not .NET 9 STS, while the repository's
global.json
specifies .NET 9.0.204 and several sample projects targetnet9.0
.This adds a
.devcontainer/devcontainer.json
configuration that:Now developers can open the repository in GitHub Codespaces and immediately run any sample project without manual SDK installation:
All existing .NET 8 samples continue to work normally, ensuring backward compatibility.
Fixes #776.
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.