Skip to content
  • English Deutsch

benjamin-abt.com

Performance is a feature | Cloud - AI - Azure - .NET - Sustainability

  • Home
  • Blog
  • Portfolio
    • Overview
    • Workshops & Training
    • Publications
  • Contact
  • Home
  • Blog

Compile your .NET projects with multiple SDKs on GitHub

Compile your .NET projects with multiple SDKs on GitHub
March 5, 2025 2 min read BEN ABT
Csharp .NET GitHub

The recommended variant for specifying the SDK in .NET is the global.json file. This centrally guarantees that all computers on which the code is compiled ideally have the same SDK installed and use it.

I have now updated my blog schwabencode.com to .NET 10 Preview 1 so that my global.json looks like this:

JSON
1{
2    "sdk": {
3        "version": "10.0.100-preview.1.25120.13"
4    }
5}

Everything can be built locally, but unfortunately not in my GitHub action. This is crashing with the following error:

Shell
 1  Tool 'bundlerminifier.core.tool' is up to date.
 2  You must install or update .NET to run this application.
 3  
 4  App: /home/runner/.nuget/packages/bundlerminifier.core.tool/7.6.2/tools/net9.0/any/dotnet-bundle.dll
 5  Architecture: x64
 6  Framework: 'Microsoft.NETCore.App', version '9.0.0' (x64)
 7  .NET location: /usr/share/dotnet/
 8  
 9  The following frameworks were found:
10    8.0.13 at [/usr/share/dotnet/shared/Microsoft.NETCore.App]
11    10.0.0-preview.1.25080.5 at [/usr/share/dotnet/shared/Microsoft.NETCore.App]

I am using a tooling that requires .NET 9; .NET 9 is also installed on my developer machine, but not on the CI system. This error is typical for using dotnet tools, but also in a .NET preview phase such as we currently have with .NET 10; it is also a typical case with Entity Framework and the EF tooling.

The solution in this case is that we have two SDK versions as a requirement for compilation - and this specification is not supported in global.json. This was simply forgotten in the design.

The solution here is that two SDKs are installed via an external command; in the case of GitHub Actions via actions/setup-dotnet .

YAML
 1jobs:
 2  build-and-deploy:
 3    runs-on: ubuntu-latest
 4    steps:
 5      - uses: actions/checkout@v4
 6
 7      - name: Setup .NET
 8        uses: actions/setup-dotnet@v4
 9        with:
10          dotnet-version: | 
11            9.x
12            10.x
13
14      - name: dotnet restore
15        run: dotnet restore
16
17      - name: dotnet build
18        run: dotnet build --no-restore --configuration Release

And then you can build your code again.

Related articles

Containerizing .NET in 2026 Without a Dockerfile

Oct 20, 2026 - 11 min read

Containerizing .NET in 2026 Without a Dockerfile

Most .NET Dockerfiles repeat the same five steps: restore, publish, select the matching Microsoft runtime image, copy the output and start …

Problem Details in ASP.NET Core and .NET 11

Oct 5, 2026 - 12 min read

Problem Details in ASP.NET Core and .NET 11

builder.Services.AddProblemDetails() registers infrastructure. It does not create an error contract. An ASP.NET Core request can fail during …

Resilience in .NET with Microsoft.Extensions.Resilience

Sep 21, 2026 - 11 min read

Resilience in .NET with Microsoft.Extensions.Resilience

Retries are the most visible resilience strategy and the easiest one to misuse. Repeating a failing call can recover from a short network …


BEN ABT

BEN ABT

Ben is Chief Engineering Officer and Principal Software Engineer at Medialesson.de, with a strong focus on .NET and Microsoft Azure. In his professional role, he designs and builds highly scalable platforms for hybrid and cloud-based scenarios. He also advises companies and C-levels on migrating to the sovereign cloud.

He runs myCSharp.de, the largest and most active German-speaking C# community forum, actively contributes to both his own and external open-source projects and regularly shares his knowledge through his blog, at community events, conferences and as a writer for technical magazines.

Let's Work Together

Looking for an experienced Platform Architect or Engineer for your next project? Whether it's cloud migration, platform modernization or building new solutions from scratch - I'm here to help you succeed.

New Platforms

Modernization

Training & Consulting

Contact Me
X Facebook LinkedIn WhatsApp
Back Next Blog Post

Open for work!

Contact Me
BEN ABT BEN ABT Software Engineer · Microsoft MVP Passionate about .NET, Azure, performance optimization and sustainable software engineering.

Medialesson GmbH Logo

Microsoft MVP Logo

Recent posts

View all
Stop Using nginx as Your Default Static File Server in Docker

Stop Using nginx as Your Default Static File Server in …

Oct 24, 2026
Containerizing .NET in 2026 Without a Dockerfile

Containerizing .NET in 2026 Without a Dockerfile

Oct 20, 2026
Problem Details in ASP.NET Core and .NET 11

Problem Details in ASP.NET Core and .NET 11

Oct 5, 2026
Resilience in .NET with Microsoft.Extensions.Resilience

Resilience in .NET with Microsoft.Extensions.Resilience

Sep 21, 2026
What Matters in ASP.NET Core 11

What Matters in ASP.NET Core 11

Sep 14, 2026

Tags

.NET (192) Csharp (96) ASP.NET Core (48) Azure (41) DevOps (17) Docker (14) Microsoft (14) EF Core (11) Microsoft MVP (11) AI (10) GitHub (10) GitHub Copilot (10) ASP.NET (9) Security (9) Synology (9) Architecture (8) Raspberry (8) Azure Functions (7) Cloudflare (7) Bicep (6)
benjamin-abt.com

About BEN

Benjamin Abt is a Software Engineer, Platform Architect and Microsoft MVP specializing in .NET, Azure, cloud architecture, performance optimization and sustainable software development.

Connect

  • Follow me on GitHub
  • Follow me on LinkedIn
  • Follow me on Mastodon
  • Microsoft MVP profile
  • Follow SchwabenCode on GitHub
  • Follow me on X

Quick Links

  • Portfolio
  • Blog
  • Workshops & Training
  • Publications
  • Get in Touch
  • Sitemap
Open for Work

© Copyright Benjamin Abt & SchwabenCode | 2011 - 2026

Content licensed under CC BY 4.0 unless otherwise noted.

  • Impressum
  • Privacy
  • Contact