Upgrades solution and packages to .NET 9

This commit is contained in:
BinaryAlley committed 2024-10-16 19:12:47 +03:00
1 parent 246392af5c
commit e2b292009f
18 files changed
+144 -113

No files matched your search

@@ -96,7 +96,9 @@ public class FileTypeService : IFileTypeService
// Read more content from the file
using FileSystemStream stream = _fileSystem.FileStream.New(path, System.IO.FileMode.Open, System.IO.FileAccess.Read, System.IO.FileShare.ReadWrite);
byte[] svgBuffer = new byte[1000];
#pragma warning disable CA2022 // Avoid inexact read with 'Stream.Read'
stream.Read(svgBuffer, 0, 1000);
#pragma warning restore CA2022 // Avoid inexact read with 'Stream.Read'
string extendedContent = Encoding.UTF8.GetString(svgBuffer);
// check if the extended content contains <svg
return extendedContent.Contains("<svg", StringComparison.OrdinalIgnoreCase);
+2 -2
View File
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<ImplicitUsings>disable</ImplicitUsings>
<Nullable>enable</Nullable>
<BaseOutputPath>$(SolutionDir)..\bin\server\</BaseOutputPath>
@@ -14,7 +14,7 @@
<ItemGroup>
<PackageReference Include="ErrorOr" Version="2.0.1" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="9.0.0-rc.2.24473.5" />
<PackageReference Include="SixLabors.ImageSharp" Version="3.1.5" />
<PackageReference Include="System.IO.Abstractions" Version="21.0.29" />
<PackageReference Include="System.IO.FileSystem.AccessControl" Version="5.0.0" />