.NET: use a preview version in your global.json

BEN ABT
medialesson
Published in
2 min readJun 17, 2024

.NET: use a preview version in your global.json

We are currently in the preview phase of .NET 9, which releases in Nov 2024 — and if you want to test it extensively like I do, store the preview version in the global configuration global.json. But how do you have to define the version here for it to work?

Wrong

Intuitively, you would assume that you can simply copy and paste the version — but that would be too simple for the .NET world.

{
"sdk": {
"version": "9.0.100-preview.5.24306.7"
}
}

Correct

The correct definition is the pure preview version specification.

{
"sdk": {
"version": "9.0.100-preview.5"
}
}

Autor

Benjamin Abt

Ben is a passionate developer and software architect and especially focused on .NET, cloud and IoT. In his professional he works on high-scalable platforms for IoT and Industry 4.0 focused on the next generation of connected industry based on Azure and .NET. He runs the largest german-speaking C# forum myCSharp.de, is the founder of the Azure UserGroup Stuttgart, a co-organizer of the AzureSaturday, runs his blog, participates in open source projects, speaks at various conferences and user groups and also has a bit free time. He is a Microsoft MVP since 2015 for .NET and Azure.

Originally published at https://schwabencode.com on June 17, 2024.

--

--