Skip to content

Commit 3a96713

Browse files
authored
Update nanoclr and host to .NET 8.0 (#3134)
1 parent 6492d91 commit 3a96713

File tree

7 files changed

+787
-83
lines changed

7 files changed

+787
-83
lines changed

targets/netcore/nanoFramework.nanoCLR.CLI/CloudsmithPackageInfo.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,24 +3,24 @@
33
// See LICENSE file in the project root for full license information.
44
//
55

6-
using Newtonsoft.Json;
76
using System;
7+
using System.Text.Json.Serialization;
88

99
namespace nanoFramework.nanoCLR.CLI
1010
{
1111
[Serializable]
1212
internal class CloudsmithPackageInfo
1313
{
14-
[JsonProperty("version")]
14+
[JsonPropertyName("version")]
1515
public string Version { get; set; }
1616

17-
[JsonProperty("cdn_url")]
17+
[JsonPropertyName("cdn_url")]
1818
public string DownloadUrl { get; set; }
1919

20-
[JsonProperty("name")]
20+
[JsonPropertyName("name")]
2121
public string TargetName { get; set; }
2222

23-
[JsonProperty("uploaded_at")]
23+
[JsonPropertyName("uploaded_at")]
2424
public DateTime PackageDate { get; set; }
2525
}
2626
}

targets/netcore/nanoFramework.nanoCLR.CLI/ClrInstanceOperationsProcessor.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
using System.Linq;
88
using System.Net.Http;
99
using System.Reflection;
10+
using System.Text.Json;
1011
using System.Threading.Tasks;
1112
using nanoFramework.nanoCLR.Host;
12-
using Newtonsoft.Json;
1313

1414
namespace nanoFramework.nanoCLR.CLI
1515
{
@@ -147,7 +147,7 @@ private static async Task<ExitCode> UpdateNanoCLRAsync(
147147
return ExitCode.E9005;
148148
}
149149

150-
var packageInfo = JsonConvert.DeserializeObject<List<CloudsmithPackageInfo>>(responseBody);
150+
var packageInfo = JsonSerializer.Deserialize<List<CloudsmithPackageInfo>>(responseBody);
151151

152152
if (packageInfo.Count != 1)
153153
{

targets/netcore/nanoFramework.nanoCLR.CLI/nanoFramework.nanoCLR.CLI.csproj

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFramework>net6.0</TargetFramework>
5+
<TargetFramework>net8.0</TargetFramework>
66
<Platforms>AnyCPU</Platforms>
77
<RuntimeIdentifiers>any</RuntimeIdentifiers>
88
<PlatformTarget>AnyCPU</PlatformTarget>
@@ -36,7 +36,7 @@
3636
<ItemGroup>
3737
<None Include="..\..\..\build\bin\$(Configuration)\nanoFramework.nanoCLR.dll" Link="NanoCLR\nanoFramework.nanoCLR.dll">
3838
<Pack>True</Pack>
39-
<PackagePath>tools\net6.0\any\NanoCLR</PackagePath>
39+
<PackagePath>tools\net8.0\any\NanoCLR</PackagePath>
4040
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
4141
</None>
4242
<None Include="..\..\..\assets\nf-logo.png">
@@ -63,14 +63,14 @@
6363
</ItemGroup>
6464

6565
<PropertyGroup>
66-
<!-- set this to 'net6.0\' to package contents in this TFM folder -->
67-
<PackageTfmSubFolder>net6.0\</PackageTfmSubFolder>
66+
<!-- set this to 'net8.0\' to package contents in this TFM folder -->
67+
<PackageTfmSubFolder>net8.0\</PackageTfmSubFolder>
6868
</PropertyGroup>
6969

7070
<ItemGroup>
7171
<PackageReference Include="CommandLineParser" Version="2.9.1" />
72-
<PackageReference Include="Nerdbank.GitVersioning" Version="3.5.119" PrivateAssets="All" />
73-
<PackageReference Include="Newtonsoft.Json" Version="13.0.2" />
72+
<PackageReference Include="Nerdbank.GitVersioning" Version="3.7.115" PrivateAssets="All" />
73+
<PackageReference Include="System.Runtime.Serialization.Json" Version="4.3.0" />
7474
<PackageReference Include="System.Security.Principal.Windows" Version="5.0.0" />
7575
</ItemGroup>
7676

0 commit comments

Comments
 (0)