Skip to content

Add a series of changes to make devcontainer experiences nicer for this repo #49867

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

baronfel
Copy link
Member

@baronfel baronfel commented Jul 19, 2025

  • make devcontainer init script build the repo
  • source the sdk-build-env script so that the IDE experience uses the local SDK
  • setup simple launch configurations for debugging the redist CLI
  • disable the CDK test explorer auto-discovery because it takes forever - trigger it once and then don't change anything
    instead
  • add MCP config so that copilot can access MS Learn docs

@baronfel baronfel requested review from Copilot and a team July 19, 2025 17:28
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 enhances the development container experience for the repository by adding build automation, IDE configuration, and debugging support. The changes streamline the setup process and improve developer productivity when working in devcontainers.

  • Automates the build process during container initialization and configures the IDE to use the locally built SDK
  • Adds VS Code launch configurations for debugging the redist CLI with proper environment variables
  • Disables automatic test discovery to improve performance and adds MCP server configuration

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.

File Description
.devcontainer/scripts/post-creation.sh Adds build automation and SDK environment setup during container initialization
.vscode/launch.json Provides debugging configurations for the .NET Core redist CLI
.vscode/settings.json Disables automatic test discovery for better performance
.vscode/mcp.json Configures MCP server for Microsoft documentation integration

Comment on lines +11 to +16
"program": "${workspaceFolder}/artifacts/bin/redist/Debug/dotnet/sdk/10.0.100-dev/dotnet.dll",
"args": [
],
"env": {
"MSBuildExtensionsPath": "${workspaceFolder}/artifacts/bin/redist/Debug/dotnet/sdk/10.0.100-dev",
"MSBuildSDKsPath": "${workspaceFolder}/artifacts/bin/redist/Debug/dotnet/sdk/10.0.100-dev/Sdks",
Copy link
Member

Choose a reason for hiding this comment

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

So, these paths will break at each major version update?

Copy link
Member Author

Choose a reason for hiding this comment

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

quite possibly, but there's not a great way to make this data-driven that I can see. normally you'd have devkit or something generate this for you, but since our setup is so particular their mechanisms don't work for us

Copy link
Member

Choose a reason for hiding this comment

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

Yes, this will have to be updated with each major version.

Copy link
Member

Choose a reason for hiding this comment

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

We can create a tasks.json with a preLaunchTask that uses the .NET Install Tool API dotnet.recommendedVersion to get the latest version of .NET and prepopulate the hard-coded value

baronfel and others added 2 commits July 22, 2025 15:16
…e SDK repo.

* make devcontainer init script build the repo
* source the sdk-build-env script so that the IDE experience uses the local SDK
* setup simple launch configurations for debugging the redist CLI
* disable the CDK test explorer auto-discovery because it takes _forever_ - trigger it once and then don't change anything instead
@baronfel baronfel force-pushed the codespaces-tweaks branch from ba84905 to 819eab5 Compare July 22, 2025 20:16
@marcpopMSFT marcpopMSFT enabled auto-merge July 22, 2025 20:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants