升级到net6.0

This commit is contained in:
不做码农
2022-03-06 14:26:05 +08:00
parent 013b6ea4db
commit 7fe07b104c
50 changed files with 306 additions and 495 deletions

View File

@@ -41,7 +41,7 @@ namespace Infrastructure
{
str = Guid.NewGuid().ToString();
}
MD5CryptoServiceProvider md5 = new MD5CryptoServiceProvider();
MD5 md5 = MD5.Create();
return BitConverter.ToString(md5.ComputeHash(Encoding.Default.GetBytes(str)), 4, 8).Replace("-", "");
}
}

View File

@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
@@ -11,7 +11,7 @@
<ItemGroup>
<PackageReference Include="AspectCore.Abstractions" Version="2.2.0" />
<PackageReference Include="Microsoft.AspNetCore.Hosting" Version="2.2.7" />
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="5.0.0" />
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="6.0.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
</ItemGroup>

View File

@@ -9,12 +9,12 @@ namespace Infrastructure
/// <summary>
/// 应用服务
/// </summary>
internal static IServiceCollection InternalServices;
public static IServiceCollection InternalServices;
/// <summary>
/// 全局配置构建器
/// </summary>
internal static IConfigurationBuilder ConfigurationBuilder;
public static IConfigurationBuilder ConfigurationBuilder;
/// <summary>
/// 获取Web主机环境
@@ -24,6 +24,6 @@ namespace Infrastructure
/// <summary>
/// 获取泛型主机环境
/// </summary>
internal static IHostEnvironment HostEnvironment;
public static IHostEnvironment HostEnvironment;
}
}