修改引用

master
MysticBoy 2 years ago
parent bb69154a14
commit e9c489c710

9
.gitignore vendored

@ -2,11 +2,8 @@
# 此 .gitignore 文件已由 Microsoft(R) Visual Studio 自动创建。 # 此 .gitignore 文件已由 Microsoft(R) Visual Studio 自动创建。
################################################################################ ################################################################################
/.vs/IoTSharp.Gateway.Modbus
/bin/Debug/net6.0
/obj /obj
/SQlLiteDatabase.db /SQlLiteDatabase.db
/IoTSharp.Gateway.Modbus.csproj.user /*.user
/.vs/ProjectEvaluation /.vs
/.vs/IoTSharp.Gateways /bin
/bin/Debug/net7.0

2
.gitmodules vendored

@ -1,4 +1,4 @@
[submodule "IoTSharpSdk"] [submodule "IoTSharpSdk"]
path = IoTSharpSdk path = IoTSharpSdk
url = https://github.com/IoTSharp/GatewaySdks.MQTT.git url = https://github.com/IoTSharp/MQTTSdk.git
branch = main branch = main

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web"> <Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup> <PropertyGroup>
<TargetFramework>net6.0</TargetFramework> <TargetFramework>net7.0</TargetFramework>
<Nullable>annotations</Nullable> <Nullable>annotations</Nullable>
<ImplicitUsings>enable</ImplicitUsings> <ImplicitUsings>enable</ImplicitUsings>
<UserSecretsId>aspnet-IoTSharp.Gateways-554A6128-AB47-40BC-8BC3-40D3123C6BFF</UserSecretsId> <UserSecretsId>aspnet-IoTSharp.Gateways-554A6128-AB47-40BC-8BC3-40D3123C6BFF</UserSecretsId>
@ -13,6 +13,13 @@
</RestoreAdditionalProjectSources> </RestoreAdditionalProjectSources>
</PropertyGroup> </PropertyGroup>
<ItemGroup>
<Compile Remove="IoTSharpSdk\**" />
<Content Remove="IoTSharpSdk\**" />
<EmbeddedResource Remove="IoTSharpSdk\**" />
<None Remove="IoTSharpSdk\**" />
</ItemGroup>
<ItemGroup> <ItemGroup>
<None Remove="SQlLiteDatabase.db" /> <None Remove="SQlLiteDatabase.db" />
</ItemGroup> </ItemGroup>
@ -23,21 +30,24 @@
<PackageReference Include="AMWD.Modbus.Serial" Version="1.2.0" /> <PackageReference Include="AMWD.Modbus.Serial" Version="1.2.0" />
<PackageReference Include="AMWD.Modbus.Tcp" Version="1.2.0" /> <PackageReference Include="AMWD.Modbus.Tcp" Version="1.2.0" />
<PackageReference Include="Modbus.SerialOverTCP" Version="1.2.1-1" /> <PackageReference Include="Modbus.SerialOverTCP" Version="1.2.1-1" />
<PackageReference Include="Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore" Version="6.0.*" /> <PackageReference Include="Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore" Version="7.0.*" />
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="6.0.*" /> <PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="7.0.*" />
<PackageReference Include="Microsoft.AspNetCore.Identity.UI" Version="6.0.*" /> <PackageReference Include="Microsoft.AspNetCore.Identity.UI" Version="7.0.*" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="6.0.*" /> <PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="7.0.*" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="6.0.*" /> <PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="7.0.*" />
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.17.0" /> <PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.17.0" />
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="6.0.*" /> <PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="7.0.*" />
<PackageReference Include="MQTTnet" Version="4.1.2.350" />
<PackageReference Include="OpcUaHelper" Version="2.1.3" /> <PackageReference Include="OpcUaHelper" Version="2.1.3" />
<PackageReference Include="Quartz.AspNetCore" Version="3.5.0" /> <PackageReference Include="Quartz.AspNetCore" Version="3.5.0" />
<PackageReference Include="System.Text.Encoding.CodePages" Version="6.0.0" /> <PackageReference Include="System.Text.Encoding.CodePages" Version="7.0.0" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Folder Include="Data\Migrations\" /> <Folder Include="Data\Migrations\" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<ProjectReference Include="IoTSharpSdk\IoTSharp.MQTTSdk.csproj" />
</ItemGroup>
</Project> </Project>

@ -5,6 +5,8 @@ VisualStudioVersion = 17.2.32616.157
MinimumVisualStudioVersion = 10.0.40219.1 MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IoTSharp.Gateways", "IoTSharp.Gateways.csproj", "{370BE0CE-5DFF-4C4D-8C87-0EA097E55447}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IoTSharp.Gateways", "IoTSharp.Gateways.csproj", "{370BE0CE-5DFF-4C4D-8C87-0EA097E55447}"
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IoTSharp.MQTTSdk", "IoTSharpSdk\IoTSharp.MQTTSdk.csproj", "{F488E869-5EE4-4B3E-A27B-2D997D674473}"
EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU Debug|Any CPU = Debug|Any CPU
@ -15,6 +17,10 @@ Global
{370BE0CE-5DFF-4C4D-8C87-0EA097E55447}.Debug|Any CPU.Build.0 = Debug|Any CPU {370BE0CE-5DFF-4C4D-8C87-0EA097E55447}.Debug|Any CPU.Build.0 = Debug|Any CPU
{370BE0CE-5DFF-4C4D-8C87-0EA097E55447}.Release|Any CPU.ActiveCfg = Release|Any CPU {370BE0CE-5DFF-4C4D-8C87-0EA097E55447}.Release|Any CPU.ActiveCfg = Release|Any CPU
{370BE0CE-5DFF-4C4D-8C87-0EA097E55447}.Release|Any CPU.Build.0 = Release|Any CPU {370BE0CE-5DFF-4C4D-8C87-0EA097E55447}.Release|Any CPU.Build.0 = Release|Any CPU
{F488E869-5EE4-4B3E-A27B-2D997D674473}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F488E869-5EE4-4B3E-A27B-2D997D674473}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F488E869-5EE4-4B3E-A27B-2D997D674473}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F488E869-5EE4-4B3E-A27B-2D997D674473}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE

@ -1 +1 @@
Subproject commit 1b7b998787c980939ecacad1d5ae8687680c3aa3 Subproject commit a7554f00f6e6d68823b2d1db5624946c2110ba96

@ -1,8 +1,10 @@
using IoTSharp.Gateways.Data; using IoTSharp.Gateways.Data;
using IoTSharp.Gateways.Jobs; using IoTSharp.Gateways.Jobs;
using IoTSharp.MqttSdk;
using Microsoft.AspNetCore.Identity; using Microsoft.AspNetCore.Identity;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using Quartz; using Quartz;
using System.Configuration;
namespace IoTSharp.Gateways namespace IoTSharp.Gateways
{ {
@ -26,7 +28,9 @@ namespace IoTSharp.Gateways
builder.Services.AddRazorPages(); builder.Services.AddRazorPages();
builder.Services.AddMemoryCache(); builder.Services.AddMemoryCache();
builder.Services.AddIoTSharpMqttSdk(builder.Configuration); builder.Services.AddSingleton<MQTTClient>()
.Configure<MqttSettings>(builder.Configuration)
.AddHostedService<MqttClientHost>();
builder.Services.AddQuartz(q => builder.Services.AddQuartz(q =>
{ {

Loading…
Cancel
Save