Skip to content

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Oct 13, 2025

  • Investigate the issue - EverythingServer and other samples fail to run due to SDK version mismatch
  • Revert incorrect global.json changes
  • Update devcontainer.json to install both .NET 9.0 and 10.0 SDKs
  • Fix devcontainer.json syntax error with multiple SDK versions
  • Verify the fix addresses the root cause

Summary of changes

Fixed sample projects in GitHub Codespaces by updating the devcontainer configuration to properly install multiple .NET SDK versions:

Changes made:

  • Kept global.json at requiring .NET 10.0 SDK (10.0.100-rc.1)
  • Updated .devcontainer/devcontainer.json to install both .NET 9.0 and 10.0 SDKs using the correct syntax:
    • Primary version: "10.0"
    • Additional SDK via additionalVersions: "9.0"

Why this approach is correct:

  • Keeps the global.json requirement for .NET 10.0, which is needed for net10.0 target frameworks in the solution
  • Uses the proper devcontainer dotnet feature syntax to install multiple SDK versions
  • The additionalVersions property allows installing .NET 9.0 alongside the primary 10.0 version

This fix ensures all target frameworks in the repository (net8.0, net9.0, and net10.0) can be built successfully in GitHub Codespaces.

Original prompt

This section details on the original issue you should resolve

<issue_title>Sample projects in this repo should "just work" in GitHub codespaces</issue_title>
<issue_description>Describe the bug

The EverythingServer fails to run in a GitHub codespace. This is a regression, as it was working after the fix to #776 was merged, but is now broken again.

To Reproduce

Open a codespace on the main branch of the repo.

@mikekistler ➜ /workspaces/csharp-sdk (main) $ dotnet --list-sdks
8.0.413 [/usr/share/dotnet/sdk]
10.0.100-rc.1.25451.107 [/usr/share/dotnet/sdk]
@mikekistler ➜ /workspaces/csharp-sdk (main) $ cd samples/EverythingServer/
@mikekistler ➜ /workspaces/csharp-sdk/samples/EverythingServer (main) $ dotnet run
You must install or update .NET to run this application.

App: /workspaces/csharp-sdk/artifacts/bin/EverythingServer/net9.0/EverythingServer
Architecture: x64
Framework: 'Microsoft.NETCore.App', version '9.0.0' (x64)
.NET location: /usr/share/dotnet

The following frameworks were found:
  8.0.19 at [/usr/share/dotnet/shared/Microsoft.NETCore.App]
  10.0.0-rc.1.25451.107 at [/usr/share/dotnet/shared/Microsoft.NETCore.App]

Learn more:
https://aka.ms/dotnet/app-launch-failed

To install missing framework, download:
https://aka.ms/dotnet-core-applaunch?framework=Microsoft.NETCore.App&framework_version=9.0.0&arch=x64&rid=linux-x64&os=ubuntu.22.04
@mikekistler ➜ /workspaces/csharp-sdk/samples/EverythingServer (main) $ 

Expected behavior

Sample projects build and run successfully in codespaces

Additional context

Possibly broken by #822
</issue_description>

Comments on the Issue (you are @copilot in this section)

Fixes #853


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

…ility

Co-authored-by: eiriktsarpalis <2813363+eiriktsarpalis@users.noreply.github.com>
@Copilot Copilot AI changed the title [WIP] Fix EverythingServer to run in GitHub codespaces Fix sample projects to work in GitHub Codespaces by updating .NET SDK version Oct 13, 2025
@Copilot Copilot AI requested a review from eiriktsarpalis October 13, 2025 15:39
Copilot finished work on behalf of eiriktsarpalis October 13, 2025 15:39
…9 and 10

Co-authored-by: eiriktsarpalis <2813363+eiriktsarpalis@users.noreply.github.com>
@Copilot Copilot AI changed the title Fix sample projects to work in GitHub Codespaces by updating .NET SDK version Fix sample projects to work in GitHub Codespaces by installing .NET 9.0 SDK Oct 13, 2025
@Copilot Copilot AI requested a review from eiriktsarpalis October 13, 2025 15:49
Copilot finished work on behalf of eiriktsarpalis October 13, 2025 15:49
@eiriktsarpalis
Copy link
Member

@copilot getting the following error:

2025-10-13 16:54:06.514Z: #15 7.292 Interpreting requested version '9.0, 10.0' as version '9.0,' with quality '10.0'
2025-10-13 16:54:06.622Z: #15 7.293 Executing scripts/vendor/dotnet-install.sh --version 9.0, --install-dir /usr/share/dotnet --quality 10.0
#15 7.316 dotnet_install: Error: '10.0' is not a supported value for --quality option. Supported values are: daily, preview, ga. If you think this is a bug, report it at ********/dotnet/install-scripts/issues.

Co-authored-by: eiriktsarpalis <2813363+eiriktsarpalis@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Oct 13, 2025

@copilot getting the following error:

2025-10-13 16:54:06.514Z: #15 7.292 Interpreting requested version '9.0, 10.0' as version '9.0,' with quality '10.0'

...

Fixed the syntax error by using additionalVersions property instead of comma-separated versions. The devcontainer feature now correctly installs .NET 10.0 as the primary version and .NET 9.0 as an additional version. Changes in commit f2dacc3.

Copilot finished work on behalf of eiriktsarpalis October 13, 2025 17:03
Copy link
Member

@eiriktsarpalis eiriktsarpalis left a comment

Choose a reason for hiding this comment

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

Confirming that the most recent changes addresses the issue.

@eiriktsarpalis eiriktsarpalis marked this pull request as ready for review October 13, 2025 17:25
@eiriktsarpalis eiriktsarpalis merged commit 31339f3 into main Oct 13, 2025
3 checks passed
@eiriktsarpalis eiriktsarpalis deleted the copilot/fix-everythingserver-codespace branch October 13, 2025 18:42
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.

Sample projects in this repo should "just work" in GitHub codespaces

3 participants