Skip to content

Commit 28f5a93

Browse files
committed
Supporting dotnet 10.0 preview version
1 parent c264b4e commit 28f5a93

7 files changed

Lines changed: 55 additions & 9 deletions

File tree

src/dotnet/devcontainer-feature.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"id": "dotnet",
3-
"version": "2.2.0",
3+
"version": "2.3.0",
44
"name": "Dotnet CLI",
55
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/dotnet",
66
"description": "This Feature installs the latest .NET SDK, which includes the .NET CLI and the shared runtime. Options are provided to choose a different version or additional versions.",
@@ -11,6 +11,7 @@
1111
"latest",
1212
"lts",
1313
"none",
14+
"10.0",
1415
"8.0",
1516
"7.0",
1617
"6.0"

src/dotnet/scripts/vendor/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,6 @@ dotnet-install.sh [--version latest] --channel 6.0 [--quality GA]
2323
dotnet-install.sh [--version latest] --channel 6.0.4xx [--quality GA]
2424
dotnet-install.sh [--version latest] --channel 8.0 --quality preview
2525
dotnet-install.sh [--version latest] --channel 8.0 --quality daily
26+
dotnet-install.sh [--version latest] --channel 10.0 --quality preview
2627
dotnet-install.sh --version 6.0.413
2728
```

src/dotnet/scripts/vendor/dotnet-install.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1396,9 +1396,7 @@ get_feeds_to_use()
13961396
{
13971397
feeds=(
13981398
"https://builds.dotnet.microsoft.com/dotnet"
1399-
"https://dotnetcli.azureedge.net/dotnet"
14001399
"https://ci.dot.net/public"
1401-
"https://dotnetbuilds.azureedge.net/public"
14021400
)
14031401

14041402
if [[ -n "$azure_feed" ]]; then

test/dotnet/install_dotnet_multiple_versions.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ is_dotnet_sdk_version_installed "7.0"
2525
check ".NET SDK 6.0 installed" \
2626
is_dotnet_sdk_version_installed "6.0"
2727

28-
check ".NET SDK 5.0 installed" \
29-
is_dotnet_sdk_version_installed "5.0"
28+
check ".NET SDK 10.0 installed" \
29+
is_dotnet_sdk_version_installed "10.0"
3030

3131
check ".NET Core SDK 3.1 installed" \
3232
is_dotnet_sdk_version_installed "3.1"
@@ -46,8 +46,8 @@ dotnet run --project projects/net7.0
4646
check "Build and run .NET 6.0 project" \
4747
dotnet run --project projects/net6.0
4848

49-
check "Build and run .NET 5.0 project" \
50-
dotnet run --project projects/net5.0
49+
check "Build and run .NET 10.0 project" \
50+
dotnet run --project projects/net10.0
5151

5252
check "Build and run .NET Core 3.1 project" \
5353
dotnet run --project projects/netcoreapp3.1
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
using Newtonsoft.Json;
2+
3+
string json = """
4+
{
5+
"Name": "Inception",
6+
"ReleaseDate": "2010-07-08T00:00:00",
7+
"Genres": [
8+
"Action",
9+
"Thriller"
10+
]
11+
}
12+
""";
13+
14+
Movie? m = JsonConvert.DeserializeObject<Movie>(json);
15+
16+
if (m == default)
17+
{
18+
Console.WriteLine("Decoding failed!");
19+
}
20+
else
21+
{
22+
Console.WriteLine($"Movie name: {m.Name}");
23+
Console.WriteLine($"Release Date: {m.ReleaseDate}");
24+
Console.WriteLine($"Genres: {string.Join(", ", m.Genres)}");
25+
}
26+
27+
class Movie(string? name, DateTime releaseDate, List<string>? genres)
28+
{
29+
public string Name { get; set; } = name ?? "Default Name";
30+
public DateTime ReleaseDate { get; set; } = releaseDate;
31+
public List<string> Genres { get; set; } = genres ?? [];
32+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<OutputType>Exe</OutputType>
5+
<TargetFramework>net10.0</TargetFramework>
6+
<ImplicitUsings>enable</ImplicitUsings>
7+
<Nullable>enable</Nullable>
8+
</PropertyGroup>
9+
10+
<ItemGroup>
11+
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
12+
</ItemGroup>
13+
14+
</Project>

test/dotnet/scenarios.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,12 @@
4040
"remoteUser": "vscode",
4141
"features": {
4242
"dotnet": {
43-
"version": "9.0",
43+
"version": "10.0",
4444
"additionalVersions": [
45+
"9.0",
4546
"8.0",
4647
"7.0",
4748
"6.0",
48-
"5.0",
4949
"3.1"
5050
]
5151
}

0 commit comments

Comments
 (0)