Skip to content

Conversation

@jongalloway
Copy link
Contributor

@jongalloway jongalloway commented Mar 12, 2025

Fixes #739

Add devcontainer configuration to the repository to enable running samples via Codespaces.

  • Add .devcontainer/devcontainer.json:

    • Set the name to ".NET Aspire Samples".
    • Use the image "mcr.microsoft.com/devcontainers/dotnet:dev-9.0-bookworm".
    • Add necessary features for the devcontainer.
    • Add customizations for VS Code extensions and settings.
    • Set onCreateCommand to "dotnet restore".
    • Set postStartCommand to "dotnet dev-certs https --trust".
    • Configure remoteEnv for the PATH.
  • Update README.md:

    • Add a section about using devcontainer and Codespaces to run the samples.
    • Provide instructions on how to set up and use the devcontainer.
    • Include steps for setting up Devcontainer and using GitHub Codespaces.

For more details, open the Copilot Workspace session.

Fixes dotnet#739

Add devcontainer configuration to the repository to enable running samples via Codespaces.

* **Add `.devcontainer/devcontainer.json`**:
  - Set the `name` to ".NET Aspire Samples".
  - Use the `image` "mcr.microsoft.com/devcontainers/dotnet:dev-9.0-bookworm".
  - Add necessary `features` for the devcontainer.
  - Add `customizations` for VS Code extensions and settings.
  - Set `onCreateCommand` to "dotnet restore".
  - Set `postStartCommand` to "dotnet dev-certs https --trust".
  - Configure `remoteEnv` for the PATH.

* **Update `README.md`**:
  - Add a section about using devcontainer and Codespaces to run the samples.
  - Provide instructions on how to set up and use the devcontainer.
  - Include steps for setting up Devcontainer and using GitHub Codespaces.

---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/dotnet/aspire-samples/issues/739?shareId=XXXX-XXXX-XXXX-XXXX).
Copilot AI review requested due to automatic review settings March 12, 2025 22:11
Copy link

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 adds documentation for using the repository's devcontainer configuration and GitHub Codespaces, enabling easier setup and execution of .NET sample projects.

  • Added a new "Using Devcontainer and Codespaces" section with step-by-step setup instructions.
  • Outlined the process for setting up the devcontainer in VS Code and creating a Codespace.

@jongalloway
Copy link
Contributor Author

Interested in thoughts from @mitchdenny who set up in dotnet/aspire dotnet/aspire#6491

@jongalloway
Copy link
Contributor Author

Also the devcontainer.json is just copied over from dotnet/aspire and is probably hilariously wrong here, just wanted to get it started.

* **.devcontainer/devcontainer.json**: Add a new devcontainer configuration file with the specified settings, features, and customizations for VS Code.
* **README.md**: Add a section about using devcontainer and Codespaces, including instructions on how to set up and use the devcontainer.
* **Configuration**
  - Set `name` to ".NET Aspire Samples"
  - Set `image` to "mcr.microsoft.com/devcontainers/dotnet:dev-9.0-bookworm"
  - Add necessary `features` for the devcontainer
  - Add `customizations` for VS Code extensions and settings
  - Set `dotnet.defaultSolution` to "samples/AspireShop/AspireShop.sln"
  - Remove `remoteEnv` PATH setting
@jongalloway jongalloway requested a review from Copilot March 13, 2025 22:44
Copy link

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 adds a devcontainer configuration and updates the README to provide instructions on using the devcontainer with GitHub Codespaces for running the samples.

  • Adds a new section in the README with step-by-step instructions for setting up and using the devcontainer.
  • Provides clear guidance for both local VS Code development and Codespaces usage.

@jongalloway jongalloway requested a review from danmoseley March 14, 2025 18:14
Copy link
Member

@danmoseley danmoseley left a comment

Choose a reason for hiding this comment

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

looks right

@danmoseley danmoseley merged commit 62c92c2 into dotnet:main Mar 15, 2025
3 checks passed
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.

Add devcontainer to this repo

3 participants