Skip to content

Commit

Permalink
Update solution to .NET 8
Browse files Browse the repository at this point in the history
  • Loading branch information
changhuixu committed Dec 7, 2023
1 parent eefac15 commit 1b16b34
Show file tree
Hide file tree
Showing 20 changed files with 974 additions and 1,007 deletions.
9 changes: 4 additions & 5 deletions Colors.API/Colors.API.csproj
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
</PropertyGroup>

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<NoWarn>$(NoWarn);1591</NoWarn>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.4.0" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.5.0" />
</ItemGroup>

</Project>
15 changes: 15 additions & 0 deletions Colors.API/Controllers/AdminController.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
using System.Runtime.InteropServices;

namespace Colors.API.Controllers;

[ApiController]
[ApiExplorerSettings(GroupName = "v3")]
[Route("api/[controller]")]
public class AdminController : ControllerBase
{
[HttpGet("sys-info")]
public ActionResult GetSystemInformation()
{
return Ok(new { os = Environment.OSVersion.VersionString, net = RuntimeInformation.FrameworkDescription });
}
}
Loading

0 comments on commit 1b16b34

Please # to comment.