Skip to content

Commit d0f6dbb

Browse files
committed
Upgrade website to ASP.NET Core 6.0
1 parent 967ac26 commit d0f6dbb

File tree

8 files changed

+14
-15
lines changed

8 files changed

+14
-15
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## 2022-02-02
4+
5+
* Upgraded website to ASP.NET Core 6.0
6+
37
## 2021-10-26
48

59
* Added Metal compiler 2.0

src/ShaderPlayground.Core.Tests/ShaderPlayground.Core.Tests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>netcoreapp3.1</TargetFramework>
4+
<TargetFramework>net6.0</TargetFramework>
55
<IsPackable>false</IsPackable>
66
</PropertyGroup>
77

src/ShaderPlayground.Core/ShaderCompilerParameter.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
using System;
2-
using Newtonsoft.Json;
3-
using Newtonsoft.Json.Converters;
2+
using System.Text.Json.Serialization;
43

54
namespace ShaderPlayground.Core
65
{
@@ -9,7 +8,7 @@ public sealed class ShaderCompilerParameter
98
public string Name { get; }
109
public string DisplayName { get; }
1110

12-
[JsonConverter(typeof(StringEnumConverter))]
11+
[JsonConverter(typeof(JsonStringEnumConverter))]
1312
public ShaderCompilerParameterType ParameterType { get; }
1413

1514
public string[] Options { get; }

src/ShaderPlayground.Core/ShaderPlayground.Core.csproj

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>netstandard2.0</TargetFramework>
5-
<LangVersion>8.0</LangVersion>
4+
<TargetFramework>net6.0</TargetFramework>
5+
<LangVersion>latest</LangVersion>
66
</PropertyGroup>
77

88
<ItemGroup>
99
<PackageReference Include="CsvHelper" Version="12.2.1" />
10-
<PackageReference Include="Newtonsoft.Json" Version="10.0.1" />
1110
</ItemGroup>
1211

1312
<ItemGroup>

src/ShaderPlayground.Core/Util/JsonTableUtility.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
using System.Collections.Generic;
2-
using Newtonsoft.Json;
2+
using System.Text.Json;
33

44
namespace ShaderPlayground.Core.Util
55
{
@@ -11,7 +11,7 @@ internal sealed class JsonTable
1111

1212
public string ToJson()
1313
{
14-
return JsonConvert.SerializeObject(this);
14+
return JsonSerializer.Serialize(this);
1515
}
1616
}
1717

src/ShaderPlayground.Web/Models/GitHubUtility.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
using System;
22
using System.Linq;
33
using System.Threading.Tasks;
4-
using Microsoft.AspNetCore.Mvc.NewtonsoftJson;
54
using Newtonsoft.Json;
65
using Octokit;
76
using ShaderPlayground.Core;
@@ -14,7 +13,7 @@ internal static class GitHubUtility
1413

1514
static GitHubUtility()
1615
{
17-
SerializerSettings = JsonSerializerSettingsProvider.CreateSerializerSettings();
16+
SerializerSettings = new JsonSerializerSettings();
1817
SerializerSettings.Formatting = Formatting.Indented;
1918
}
2019

src/ShaderPlayground.Web/ShaderPlayground.Web.csproj

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk.Web">
22

33
<PropertyGroup>
4-
<TargetFramework>netcoreapp3.1</TargetFramework>
4+
<TargetFramework>net6.0</TargetFramework>
55
<UserSecretsId>0d767b89-f281-4b11-a100-c06e6f634c5e</UserSecretsId>
66
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
77
<ApplicationInsightsResourceId>/subscriptions/890b998c-6372-4369-8f70-cb6709a640d4/resourcegroups/DefaultResourceGroup/providers/microsoft.insights/components/tryhlsl</ApplicationInsightsResourceId>
@@ -12,7 +12,6 @@
1212
<ItemGroup>
1313
<PackageReference Include="BuildBundlerMinifier" Version="3.2.449" />
1414
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.15.0" />
15-
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="3.1.8" />
1615
<PackageReference Include="Microsoft.Web.LibraryManager.Build" Version="2.1.76" />
1716
<PackageReference Include="Octokit" Version="0.48.0" />
1817
</ItemGroup>

src/ShaderPlayground.Web/Startup.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@ public void ConfigureServices(IServiceCollection services)
2222
.AddMvc(options =>
2323
{
2424
options.EnableEndpointRouting = false;
25-
})
26-
.AddNewtonsoftJson();
25+
});
2726

2827
services.AddApplicationInsightsTelemetry();
2928
}

0 commit comments

Comments
 (0)