diff --git a/src/Admin/ThingsGateway.Furion/DataEncryption/Encryptions/PBKDF2Encryption.cs b/src/Admin/ThingsGateway.Furion/DataEncryption/Encryptions/PBKDF2Encryption.cs index a13dc28ec..291fa6eec 100644 --- a/src/Admin/ThingsGateway.Furion/DataEncryption/Encryptions/PBKDF2Encryption.cs +++ b/src/Admin/ThingsGateway.Furion/DataEncryption/Encryptions/PBKDF2Encryption.cs @@ -35,7 +35,7 @@ public static class PBKDF2Encryption var salt = new byte[saltSize]; rng.GetBytes(salt); #if NET10_0_OR_GREATER - var hash = Rfc2898DeriveBytes.Pbkdf2(Encoding.UTF8.GetBytes(text), salt, iterationCount, HashAlgorithmName.SHA256, derivedKeyLength); + var hash = Rfc2898DeriveBytes.Pbkdf2(System.Text.Encoding.UTF8.GetBytes(text), salt, iterationCount, HashAlgorithmName.SHA256, derivedKeyLength); #else using var pbkdf2 = new Rfc2898DeriveBytes(text, salt, iterationCount, HashAlgorithmName.SHA256); var hash = pbkdf2.GetBytes(derivedKeyLength); @@ -69,7 +69,7 @@ public static class PBKDF2Encryption return false; #if NET10_0_OR_GREATER - var computedHash = Rfc2898DeriveBytes.Pbkdf2(Encoding.UTF8.GetBytes(text), saltBytes, iterationCount, HashAlgorithmName.SHA256, derivedKeyLength); + var computedHash = Rfc2898DeriveBytes.Pbkdf2(System.Text.Encoding.UTF8.GetBytes(text), saltBytes, iterationCount, HashAlgorithmName.SHA256, derivedKeyLength); #else using var pbkdf2 = new Rfc2898DeriveBytes(text, saltBytes, iterationCount, HashAlgorithmName.SHA256); var computedHash = pbkdf2.GetBytes(derivedKeyLength); diff --git a/src/Directory.Build.props b/src/Directory.Build.props index cfb4dceb5..730308948 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -1,9 +1,9 @@ - 10.11.76 - 10.11.76 - 10.11.76 + 10.11.77 + 10.11.77 + 10.11.77 10.11.6 10.11.6 8.0.20 diff --git a/src/Plugin/ThingsGateway.Foundation.Test/ThingsGateway.Foundation.Test.csproj b/src/Plugin/ThingsGateway.Foundation.Test/ThingsGateway.Foundation.Test.csproj index 68b6603ce..84fcc47ba 100644 --- a/src/Plugin/ThingsGateway.Foundation.Test/ThingsGateway.Foundation.Test.csproj +++ b/src/Plugin/ThingsGateway.Foundation.Test/ThingsGateway.Foundation.Test.csproj @@ -14,7 +14,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Plugin/ThingsGateway.Plugin.Mqtt/MqttServer/MqttServer.cs b/src/Plugin/ThingsGateway.Plugin.Mqtt/MqttServer/MqttServer.cs index dbce904f7..72582ec84 100644 --- a/src/Plugin/ThingsGateway.Plugin.Mqtt/MqttServer/MqttServer.cs +++ b/src/Plugin/ThingsGateway.Plugin.Mqtt/MqttServer/MqttServer.cs @@ -12,6 +12,11 @@ using Microsoft.AspNetCore.Hosting; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; +#if NET10_0_OR_GREATER + +using Microsoft.Extensions.Hosting; + +#endif using MQTTnet.AspNetCore; using ThingsGateway.Foundation; diff --git a/src/Plugin/ThingsGateway.Plugin.Mqtt/MqttServer/MqttServer.other.cs b/src/Plugin/ThingsGateway.Plugin.Mqtt/MqttServer/MqttServer.other.cs index dad8ea4cf..23d807c2f 100644 --- a/src/Plugin/ThingsGateway.Plugin.Mqtt/MqttServer/MqttServer.other.cs +++ b/src/Plugin/ThingsGateway.Plugin.Mqtt/MqttServer/MqttServer.other.cs @@ -42,7 +42,7 @@ public partial class MqttServer : BusinessBaseWithCacheIntervalScriptAll #if NET10_0_OR_GREATER - private IHost _webHost { get; set; } + private Microsoft.Extensions.Hosting.IHost _webHost { get; set; } #else private IWebHost _webHost { get; set; }