Compare commits

..

12 Commits

Author SHA1 Message Date
Kimdiego2098
ac3525a953 更新版本 2024-02-02 15:15:32 +08:00
Kimdiego2098
c8c3f5b134 更新构建脚本 2024-02-02 15:14:37 +08:00
Kimdiego2098
51319c0718 mqttClient每次发布都作为遗嘱消息 2024-02-02 14:38:24 +08:00
Kimdiego2098
43399b8b47 mqttClient连接失败时缓存数据 2024-02-02 14:36:49 +08:00
Kimdiego2098
a6596042b7 修复上传业务缓存删除逻辑 2024-02-02 14:26:00 +08:00
Kimdiego2098
23ae85fc9c Revert "修复上传业务缓存删除逻辑"
This reverts commit 2da54862f1.
2024-02-02 14:25:21 +08:00
Kimdiego2098
2da54862f1 修复上传业务缓存删除逻辑 2024-02-02 14:24:49 +08:00
Kimdiego2098
f272fb0559 更新版本 2024-02-02 13:00:04 +08:00
Kimdiego2098
bd04e33586 底层通道设备列表更换为线程安全列表 2024-02-02 12:29:19 +08:00
Kimdiego2098
b09b9752ca mqttServer修复客户端连接时,发送初始数据分组错误 2024-02-02 12:16:43 +08:00
Kimdiego2098
a810a48158 更新dockerfile 2024-02-02 08:40:10 +08:00
Kimdiego2098
b4f5792aa8 串口流BeginRead更换为ReadAsync 2024-02-01 16:50:01 +08:00
30 changed files with 64 additions and 50 deletions

View File

@@ -6,7 +6,7 @@
<LangVersion>11.0</LangVersion>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<Version>5.0.0.10</Version>
<Version>5.0.0.12</Version>
<Authors>Diego</Authors>
<Company>Diego</Company>
<Product>Diego</Product>

View File

@@ -1,6 +1,6 @@
<Project>
<PropertyGroup>
<TargetFrameworks>net6.0;net7.0;net8.0;</TargetFrameworks>
<TargetFrameworks>net6.0;</TargetFrameworks>
</PropertyGroup>
<ItemGroup>

View File

@@ -43,7 +43,7 @@ public static class LiteDBCacheUtil
var dir = GetFilePath(id);
var fileStart = GetFileStartName(typeName);
var maxNum = GetMaxNumFileName(id, typeName);
var fullName = dir.CombinePath($"{fileStart}{maxNum}{ex}");
var fullName = dir.CombinePath($"{fileStart}_{maxNum}{ex}");
if (isDeleteRule)
{
//磁盘使用率限制
@@ -59,9 +59,14 @@ public static class LiteDBCacheUtil
foreach (var d in dirs)
{
string[] files = Directory.GetFiles(d);
//如果文件数量小于4的退出循环
if (files.Length < 4)
{
break;
}
//数量超限就删除旧文件
//按文件更改时间降序排序
var sortedFiles = files.OrderByDescending(file => File.GetLastWriteTime(file));
//按文件更改时间排序
var sortedFiles = files.OrderBy(file => File.GetLastWriteTime(file)).ToArray();
// 需要删除的文件数量
int filesToDeleteCount = files.Length - Math.Max(2, (int)(files.Length * 0.1));
@@ -69,14 +74,14 @@ public static class LiteDBCacheUtil
// 删除较旧的文件
for (int i = 0; i < filesToDeleteCount; i++)
{
var fileName = sortedFiles.ElementAt(i);
var fileName = sortedFiles[i];
if (_dict.TryGetValue(fileName, out object cache1))
{
DisposeAndDeleteFile(fileName, cache1);
}
else
{
DeleteFile(fullName);
DeleteFile(fileName);
}
}
}
@@ -90,7 +95,7 @@ public static class LiteDBCacheUtil
{
//数量超限就删除旧文件
//按文件更改时间降序排序
var sortedFiles = files.OrderByDescending(file => File.GetLastWriteTime(file));
var sortedFiles = files.OrderBy(file => File.GetLastWriteTime(file)).ToArray();
// 需要删除的文件数量
int filesToDeleteCount = files.Length - LiteDBCacheUtil.config.MaxFileCount;
@@ -98,14 +103,14 @@ public static class LiteDBCacheUtil
// 删除较旧的文件
for (int i = 0; i < filesToDeleteCount; i++)
{
var fileName = sortedFiles.ElementAt(i);
var fileName = sortedFiles[i];
if (_dict.TryGetValue(fileName, out object cache1))
{
DisposeAndDeleteFile(fileName, cache1);
}
else
{
DeleteFile(fullName);
DeleteFile(fileName);
}
}
}
@@ -126,7 +131,7 @@ public static class LiteDBCacheUtil
if (mb1 > LiteDBCacheUtil.config.MaxFileLength)
{
//大小超限就返回新的文件
var newFullName = dir.CombinePath($"{fileStart}{maxNum + 1}{ex}");
var newFullName = dir.CombinePath($"{fileStart}_{maxNum + 1}{ex}");
{
if (_dict.TryGetValue(fullName, out object cache1))
{
@@ -239,14 +244,14 @@ public static class LiteDBCacheUtil
var fileStart = GetFileStartName(typeName);
//搜索全部符合条件的文件
if (!File.Exists(dir.CombinePath($"{fileStart}{ex}")))
if (!File.Exists(dir.CombinePath($"{fileStart}_{ex}")))
{
return null;
}
var index = 1;
while (true)
{
var newFileName = dir.CombinePath($"{fileStart}{index}{ex}");
var newFileName = dir.CombinePath($"{fileStart}_{index}{ex}");
if (System.IO.File.Exists(newFileName))
{
index++;

View File

@@ -2,9 +2,9 @@
<Import Project="$(SolutionDir)PackNuget.props" />
<ItemGroup>
<PackageReference Include="Furion.Pure" Version="4.9.1.27" />
<PackageReference Include="Furion.Extras.Authentication.JwtBearer" Version="4.9.1.27" />
<PackageReference Include="Furion.Extras.ObjectMapper.Mapster" Version="4.9.1.27" />
<PackageReference Include="Furion.Pure" Version="4.9.1.28" />
<PackageReference Include="Furion.Extras.Authentication.JwtBearer" Version="4.9.1.28" />
<PackageReference Include="Furion.Extras.ObjectMapper.Mapster" Version="4.9.1.28" />
<PackageReference Include="NewLife.Redis" Version="5.6.2024.105" />
<PackageReference Include="Yitter.IdGenerator" Version="1.0.14" />
<PackageReference Include="LiteDB" Version="5.0.17" />

View File

@@ -3,7 +3,7 @@
<ItemGroup>
<PackageReference Include="NewLife.Core" Version="10.6.2024.101" />
<PackageReference Include="NewLife.Core" Version="10.7.2024.202" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
</ItemGroup>

View File

@@ -1,10 +1,13 @@
#See https://aka.ms/customizecontainer to learn how to customize your debug container and how Visual Studio uses this Dockerfile to build your images for faster debugging.
#aspnetcore6.0环境
FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS base
COPY . /app
WORKDIR /app
EXPOSE 80
#linux安装
EXPOSE 7200
#图像库
RUN echo "deb https://mirrors.tuna.tsinghua.edu.cn/debian/ sid main contrib non-free" > /etc/apt/sources.list
RUN apt-get update && apt-get -y install libfontconfig1
ENTRYPOINT ["dotnet", "ThingsGateway.Web.Server.dll","--urls","http://*:7200"]
#7200端口
ENTRYPOINT ["dotnet", "ThingsGateway.Web.Entry.dll","--urls","http://*:7200"]

View File

@@ -22,7 +22,7 @@ public interface IChannel : IConnectObject, ICloseObject, ISetupConfigObject, ID
/// <summary>
/// 该通道下的所有设备
/// </summary>
public List<IProtocol> Collects { get; }
public ConcurrentList<IProtocol> Collects { get; }
/// <summary>
/// CanSend

View File

@@ -139,14 +139,14 @@ namespace ThingsGateway.Foundation
var byteBlock = new ByteBlock(this.ReceiveBufferSize);
try
{
var r = await Task<int>.Factory.FromAsync(this.m_serialPort.BaseStream.BeginRead, this.m_serialPort.BaseStream.EndRead, byteBlock.Buffer, 0, byteBlock.Capacity, default).ConfigureFalseAwait();
var r = await this.m_serialPort.BaseStream.ReadAsync(byteBlock.Buffer, 0, byteBlock.Capacity, default).ConfigureFalseAwait();
if (r == 0)
{
this.PrivateBreakOut(false, FoundationConst.RemoteClose);
return;
}
if (m_serialPort.BytesToRead > 0)
r += await Task<int>.Factory.FromAsync(this.m_serialPort.BaseStream.BeginRead, this.m_serialPort.BaseStream.EndRead, byteBlock.Buffer, r, byteBlock.Capacity - r, default);
r += await this.m_serialPort.BaseStream.ReadAsync(byteBlock.Buffer, r, byteBlock.Capacity - r, default).ConfigureFalseAwait();
byteBlock.SetLength(r);
this.HandleBuffer(byteBlock);

View File

@@ -29,7 +29,7 @@ namespace ThingsGateway.Foundation
public EasyLock WaitLock { get; } = new EasyLock();
/// <inheritdoc/>
public List<IProtocol> Collects { get; } = new();
public ConcurrentList<IProtocol> Collects { get; } = new();
/// <summary>
/// 接收到数据

View File

@@ -34,7 +34,7 @@ namespace ThingsGateway.Foundation
public EasyLock WaitLock { get; } = new EasyLock();
/// <inheritdoc/>
public List<IProtocol> Collects { get; } = new();
public ConcurrentList<IProtocol> Collects { get; } = new();
/// <inheritdoc/>
protected override void Dispose(bool disposing)

View File

@@ -20,7 +20,7 @@ namespace ThingsGateway.Foundation
public class TgTcpClient : TgTcpClientBase, IClientChannel
{
/// <inheritdoc/>
public List<IProtocol> Collects { get; } = new();
public ConcurrentList<IProtocol> Collects { get; } = new();
/// <inheritdoc/>
public EasyLock WaitLock { get; } = new EasyLock();

View File

@@ -26,7 +26,7 @@ namespace ThingsGateway.Foundation
}
/// <inheritdoc/>
public List<IProtocol> Collects { get; } = new();
public ConcurrentList<IProtocol> Collects { get; } = new();
#region

View File

@@ -56,7 +56,7 @@ namespace ThingsGateway.Foundation
DataHandlingAdapter IClientChannel.DataHandlingAdapter => DataHandlingAdapter;
/// <inheritdoc/>
public List<IProtocol> Collects { get; } = new();
public ConcurrentList<IProtocol> Collects { get; } = new();
/// <inheritdoc/>
public void SetDataHandlingAdapter(DataHandlingAdapter adapter)

View File

@@ -11,7 +11,7 @@
<ItemGroup>
<PackageReference Include="NewLife.Core" Version="10.6.2024.101" />
<PackageReference Include="NewLife.Core" Version="10.7.2024.202" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="TouchSocket" Version="2.0.0-beta.270" />
</ItemGroup>

View File

@@ -3,7 +3,7 @@
<Target Name="PostBuild" AfterTargets="PostBuildEvent">
<Exec Command=" set dir=&quot;$(SolutionDir)bin\$(Configuration)\ThingsGateway.Web.Entry\$(TargetFramework)\Plugins\$(AssemblyName)&quot;&#xD;&#xA; if not exist %25dir%25 md %25dir%25 &#xD;&#xA;copy &quot;$(TargetDir)*Dlt645*.dll&quot; %25dir%25&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;cd /d &quot;$(TargetDir)&quot;&#xD;&#xA;::设置要排除的文件格式,多个格式之间使用英文逗号隔开&#xD;&#xA;set Ext=dll&#xD;&#xA;::删除文件&#xD;&#xA;for /f &quot;delims=&quot; %25%25a in ('dir /a-d/s/b') do (&#xD;&#xA; if /i not &quot;%25%25~a&quot;==&quot;%25~f0&quot; (&#xD;&#xA; set &quot;Skip=&quot;&#xD;&#xA; for %25%25i in (%25Ext%25) do (&#xD;&#xA; if /i &quot;.%25%25~i&quot;==&quot;%25%25~xa&quot; (&#xD;&#xA; set Skip=OK&#xD;&#xA; )&#xD;&#xA; )&#xD;&#xA; if not defined Skip (&#xD;&#xA; del /f /q &quot;%25%25~a&quot;&#xD;&#xA; )&#xD;&#xA; )&#xD;&#xA;)&#xD;&#xA;&#xD;&#xA;for /d %25%25i in (*) do (&#xD;&#xA; rd /s /q &quot;%25%25i&quot;&#xD;&#xA;)&#xD;&#xA;&#xD;&#xA;" />
<Exec Command="@echo off&#xD;&#xA;setlocal enabledelayedexpansion&#xD;&#xA;&#xD;&#xA;set &quot;targetFWS=net6.0 net7.0 net8.0&quot;&#xD;&#xA;for %25%25f in (%25targetFWS%25) do (&#xD;&#xA; set &quot;dir=$(SolutionDir)bin\$(Configuration)\ThingsGateway.Web.Entry\%25%25f\Plugins\$(AssemblyName)&quot;&#xD;&#xA; if not exist &quot;!dir!&quot; md &quot;!dir!&quot;&#xD;&#xA; copy &quot;$(TargetDir)*Dlt645*.dll&quot; &quot;!dir!&quot;&#xD;&#xA;)&#xD;&#xA;&#xD;&#xA;endlocal&#xD;&#xA;" />
</Target>
<ItemGroup>

View File

@@ -3,7 +3,7 @@
<Target Name="PostBuild" AfterTargets="PostBuildEvent">
<Exec Command=" set dir=&quot;$(SolutionDir)bin\$(Configuration)\ThingsGateway.Web.Entry\$(TargetFramework)\Plugins\$(AssemblyName)&quot;&#xD;&#xA; if not exist %25dir%25 md %25dir%25 &#xD;&#xA;copy &quot;$(TargetDir)*Kafka*.dll&quot; %25dir%25&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;cd /d &quot;$(TargetDir)&quot;&#xD;&#xA;::设置要排除的文件格式,多个格式之间使用英文逗号隔开&#xD;&#xA;set Ext=dll&#xD;&#xA;::删除文件&#xD;&#xA;for /f &quot;delims=&quot; %25%25a in ('dir /a-d/s/b') do (&#xD;&#xA; if /i not &quot;%25%25~a&quot;==&quot;%25~f0&quot; (&#xD;&#xA; set &quot;Skip=&quot;&#xD;&#xA; for %25%25i in (%25Ext%25) do (&#xD;&#xA; if /i &quot;.%25%25~i&quot;==&quot;%25%25~xa&quot; (&#xD;&#xA; set Skip=OK&#xD;&#xA; )&#xD;&#xA; )&#xD;&#xA; if not defined Skip (&#xD;&#xA; del /f /q &quot;%25%25~a&quot;&#xD;&#xA; )&#xD;&#xA; )&#xD;&#xA;)&#xD;&#xA;&#xD;&#xA;for /d %25%25i in (*) do (&#xD;&#xA; rd /s /q &quot;%25%25i&quot;&#xD;&#xA;)&#xD;&#xA;&#xD;&#xA;" />
<Exec Command="@echo off&#xD;&#xA;setlocal enabledelayedexpansion&#xD;&#xA;&#xD;&#xA;set &quot;targetFWS=net6.0 net7.0 net8.0&quot;&#xD;&#xA;for %25%25f in (%25targetFWS%25) do (&#xD;&#xA; set &quot;dir=$(SolutionDir)bin\$(Configuration)\ThingsGateway.Web.Entry\%25%25f\Plugins\$(AssemblyName)&quot;&#xD;&#xA; if not exist &quot;!dir!&quot; md &quot;!dir!&quot;&#xD;&#xA; copy &quot;$(TargetDir)*Kafka*.dll&quot; &quot;!dir!&quot;&#xD;&#xA;)&#xD;&#xA;&#xD;&#xA;endlocal&#xD;&#xA;" />
</Target>
<PropertyGroup>

View File

@@ -3,7 +3,7 @@
<Target Name="PostBuild" AfterTargets="PostBuildEvent">
<Exec Command=" set dir=&quot;$(SolutionDir)bin\$(Configuration)\ThingsGateway.Web.Entry\$(TargetFramework)\Plugins\$(AssemblyName)&quot;&#xD;&#xA; if not exist %25dir%25 md %25dir%25 &#xD;&#xA;copy &quot;$(TargetDir)*Modbus*.dll&quot; %25dir%25&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;cd /d &quot;$(TargetDir)&quot;&#xD;&#xA;::设置要排除的文件格式,多个格式之间使用英文逗号隔开&#xD;&#xA;set Ext=dll&#xD;&#xA;::删除文件&#xD;&#xA;for /f &quot;delims=&quot; %25%25a in ('dir /a-d/s/b') do (&#xD;&#xA; if /i not &quot;%25%25~a&quot;==&quot;%25~f0&quot; (&#xD;&#xA; set &quot;Skip=&quot;&#xD;&#xA; for %25%25i in (%25Ext%25) do (&#xD;&#xA; if /i &quot;.%25%25~i&quot;==&quot;%25%25~xa&quot; (&#xD;&#xA; set Skip=OK&#xD;&#xA; )&#xD;&#xA; )&#xD;&#xA; if not defined Skip (&#xD;&#xA; del /f /q &quot;%25%25~a&quot;&#xD;&#xA; )&#xD;&#xA; )&#xD;&#xA;)&#xD;&#xA;&#xD;&#xA;for /d %25%25i in (*) do (&#xD;&#xA; rd /s /q &quot;%25%25i&quot;&#xD;&#xA;)&#xD;&#xA;&#xD;&#xA;" />
<Exec Command="@echo off&#xD;&#xA;setlocal enabledelayedexpansion&#xD;&#xA;&#xD;&#xA;set &quot;targetFWS=net6.0 net7.0 net8.0&quot;&#xD;&#xA;for %25%25f in (%25targetFWS%25) do (&#xD;&#xA; set &quot;dir=$(SolutionDir)bin\$(Configuration)\ThingsGateway.Web.Entry\%25%25f\Plugins\$(AssemblyName)&quot;&#xD;&#xA; if not exist &quot;!dir!&quot; md &quot;!dir!&quot;&#xD;&#xA; copy &quot;$(TargetDir)*Modbus*.dll&quot; &quot;!dir!&quot;&#xD;&#xA;)&#xD;&#xA;&#xD;&#xA;endlocal&#xD;&#xA;&#xD;&#xA;" />
</Target>
<ItemGroup>

View File

@@ -110,7 +110,7 @@ public partial class MqttClient : BusinessBaseWithCacheIntervalScript<VariableDa
success = clientResult.IsSuccess;
}
await Delay(cancellationToken);
return;
//return;
}
await Update(cancellationToken);

View File

@@ -295,7 +295,7 @@ public partial class MqttClient : BusinessBaseWithCacheIntervalScript<VariableDa
if (isConnect.IsSuccess)
{
var variableMessage = new MqttApplicationMessageBuilder()
.WithTopic(topic)
.WithTopic(topic).WithRetainFlag(true)
.WithPayload(payLoad).Build();
var result = await _mqttClient.PublishAsync(variableMessage, cancellationToken);
if (result.IsSuccess)

View File

@@ -207,13 +207,19 @@ public partial class MqttServer : BusinessBaseWithCacheIntervalScript<VariableDa
arg.ReasonCode = MqttConnectReasonCode.BadUserNameOrPassword;
return;
}
List<MqttApplicationMessage> data = GetRetainedMessages();
foreach (var item in data)
{
await _mqttServer.UpdateRetainedMessageAsync(item);
}
LogMessage?.LogInformation($"{ToString()}-{arg.ClientId}-客户端已连接成功");
_ = Task.Run(async () =>
{
//延时发送
await Task.Delay(1000);
List<MqttApplicationMessage> data = GetRetainedMessages();
foreach (var item in data)
{
await _mqttServer.InjectApplicationMessage(
new InjectedMqttApplicationMessage(item));
//await _mqttServer.UpdateRetainedMessageAsync(item);
}
});
}
/// <summary>

View File

@@ -3,7 +3,7 @@
<Target Name="PostBuild" AfterTargets="PostBuildEvent">
<Exec Command=" set dir=&quot;$(SolutionDir)bin\$(Configuration)\ThingsGateway.Web.Entry\$(TargetFramework)\Plugins\$(AssemblyName)&quot;&#xD;&#xA; if not exist %25dir%25 md %25dir%25 &#xD;&#xA;copy &quot;$(TargetDir)*Mqtt*.dll&quot; %25dir%25&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;cd /d &quot;$(TargetDir)&quot;&#xD;&#xA;::设置要排除的文件格式,多个格式之间使用英文逗号隔开&#xD;&#xA;set Ext=dll&#xD;&#xA;::删除文件&#xD;&#xA;for /f &quot;delims=&quot; %25%25a in ('dir /a-d/s/b') do (&#xD;&#xA; if /i not &quot;%25%25~a&quot;==&quot;%25~f0&quot; (&#xD;&#xA; set &quot;Skip=&quot;&#xD;&#xA; for %25%25i in (%25Ext%25) do (&#xD;&#xA; if /i &quot;.%25%25~i&quot;==&quot;%25%25~xa&quot; (&#xD;&#xA; set Skip=OK&#xD;&#xA; )&#xD;&#xA; )&#xD;&#xA; if not defined Skip (&#xD;&#xA; del /f /q &quot;%25%25~a&quot;&#xD;&#xA; )&#xD;&#xA; )&#xD;&#xA;)&#xD;&#xA;for /d %25%25i in (*) do (&#xD;&#xA; rd /s /q &quot;%25%25i&quot;&#xD;&#xA;)&#xD;&#xA;" />
<Exec Command="@echo off&#xD;&#xA;setlocal enabledelayedexpansion&#xD;&#xA;&#xD;&#xA;set &quot;targetFWS=net6.0 net7.0 net8.0&quot;&#xD;&#xA;for %25%25f in (%25targetFWS%25) do (&#xD;&#xA; set &quot;dir=$(SolutionDir)bin\$(Configuration)\ThingsGateway.Web.Entry\%25%25f\Plugins\$(AssemblyName)&quot;&#xD;&#xA; if not exist &quot;!dir!&quot; md &quot;!dir!&quot;&#xD;&#xA; copy &quot;$(TargetDir)*Mqtt*.dll&quot; &quot;!dir!&quot;&#xD;&#xA;)&#xD;&#xA;&#xD;&#xA;endlocal&#xD;&#xA;" />
</Target>
<ItemGroup>

View File

@@ -7,7 +7,7 @@
<Target Name="PostBuild" AfterTargets="PostBuildEvent">
<Exec Command=" set dir=&quot;$(SolutionDir)bin\$(Configuration)\ThingsGateway.Web.Entry\$(TargetFramework)\Plugins\$(AssemblyName)&quot;&#xD;&#xA; if not exist %25dir%25 md %25dir%25 &#xD;&#xA;copy &quot;$(TargetDir)*OpcDa*.dll&quot; %25dir%25&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;cd /d &quot;$(TargetDir)&quot;&#xD;&#xA;::设置要排除的文件格式,多个格式之间使用英文逗号隔开&#xD;&#xA;set Ext=dll&#xD;&#xA;::删除文件&#xD;&#xA;for /f &quot;delims=&quot; %25%25a in ('dir /a-d/s/b') do (&#xD;&#xA; if /i not &quot;%25%25~a&quot;==&quot;%25~f0&quot; (&#xD;&#xA; set &quot;Skip=&quot;&#xD;&#xA; for %25%25i in (%25Ext%25) do (&#xD;&#xA; if /i &quot;.%25%25~i&quot;==&quot;%25%25~xa&quot; (&#xD;&#xA; set Skip=OK&#xD;&#xA; )&#xD;&#xA; )&#xD;&#xA; if not defined Skip (&#xD;&#xA; del /f /q &quot;%25%25~a&quot;&#xD;&#xA; )&#xD;&#xA; )&#xD;&#xA;)&#xD;&#xA;&#xD;&#xA;for /d %25%25i in (*) do (&#xD;&#xA; rd /s /q &quot;%25%25i&quot;&#xD;&#xA;)&#xD;&#xA;&#xD;&#xA;" />
<Exec Command="@echo off&#xD;&#xA;setlocal enabledelayedexpansion&#xD;&#xA;&#xD;&#xA;set &quot;targetFWS=net6.0 net7.0 net8.0&quot;&#xD;&#xA;for %25%25f in (%25targetFWS%25) do (&#xD;&#xA; set &quot;dir=$(SolutionDir)bin\$(Configuration)\ThingsGateway.Web.Entry\%25%25f\Plugins\$(AssemblyName)&quot;&#xD;&#xA; if not exist &quot;!dir!&quot; md &quot;!dir!&quot;&#xD;&#xA; copy &quot;$(TargetDir)*OpcDa*.dll&quot; &quot;!dir!&quot;&#xD;&#xA;)&#xD;&#xA;&#xD;&#xA;endlocal&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
</Target>
<ItemGroup>

View File

@@ -8,7 +8,7 @@
<Target Name="PostBuild" AfterTargets="PostBuildEvent">
<Exec Command=" set dir=&quot;$(SolutionDir)bin\$(Configuration)\ThingsGateway.Web.Entry\$(TargetFramework)\Plugins\$(AssemblyName)&quot;&#xD;&#xA; if not exist %25dir%25 md %25dir%25 &#xD;&#xA;copy &quot;$(TargetDir)*OpcUa*.dll&quot; %25dir%25&#xD;&#xA;copy &quot;$(TargetDir)*Opc.Ua*.dll&quot; %25dir%25&#xD;&#xA;copy &quot;$(TargetDir)*System.Formats.Asn1*.dll&quot; %25dir%25&#xD;&#xA;&#xD;&#xA;cd /d &quot;$(TargetDir)&quot;&#xD;&#xA;::设置要排除的文件格式,多个格式之间使用英文逗号隔开&#xD;&#xA;set Ext=dll&#xD;&#xA;::删除文件&#xD;&#xA;for /f &quot;delims=&quot; %25%25a in ('dir /a-d/s/b') do (&#xD;&#xA; if /i not &quot;%25%25~a&quot;==&quot;%25~f0&quot; (&#xD;&#xA; set &quot;Skip=&quot;&#xD;&#xA; for %25%25i in (%25Ext%25) do (&#xD;&#xA; if /i &quot;.%25%25~i&quot;==&quot;%25%25~xa&quot; (&#xD;&#xA; set Skip=OK&#xD;&#xA; )&#xD;&#xA; )&#xD;&#xA; if not defined Skip (&#xD;&#xA; del /f /q &quot;%25%25~a&quot;&#xD;&#xA; )&#xD;&#xA; )&#xD;&#xA;)&#xD;&#xA;for /d %25%25i in (*) do (&#xD;&#xA; rd /s /q &quot;%25%25i&quot;&#xD;&#xA;)&#xD;&#xA;&#xD;&#xA;" />
<Exec Command="@echo off&#xD;&#xA;setlocal enabledelayedexpansion&#xD;&#xA;&#xD;&#xA;set &quot;targetFWS=net6.0 net7.0 net8.0&quot;&#xD;&#xA;for %25%25f in (%25targetFWS%25) do (&#xD;&#xA; set &quot;dir=$(SolutionDir)bin\$(Configuration)\ThingsGateway.Web.Entry\%25%25f\Plugins\$(AssemblyName)&quot;&#xD;&#xA; if not exist &quot;!dir!&quot; md &quot;!dir!&quot;&#xD;&#xA; copy &quot;$(TargetDir)*OpcUa*.dll&quot; &quot;!dir!&quot;&#xD;&#xA; copy &quot;$(TargetDir)*Opc.Ua*.dll&quot; &quot;!dir!&quot;&#xD;&#xA; copy &quot;$(TargetDir)*System.Formats.Asn1*.dll&quot; &quot;!dir!&quot;&#xD;&#xA;)&#xD;&#xA;&#xD;&#xA;endlocal&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
</Target>
<ItemGroup>

View File

@@ -3,7 +3,7 @@
<Target Name="PostBuild" AfterTargets="PostBuildEvent">
<Exec Command=" set dir=&quot;$(SolutionDir)bin\$(Configuration)\ThingsGateway.Web.Entry\$(TargetFramework)\Plugins\$(AssemblyName)&quot;&#xD;&#xA; if not exist %25dir%25 md %25dir%25 &#xD;&#xA;copy &quot;$(TargetDir)*QuestDB*.dll&quot; %25dir%25&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;cd /d &quot;$(TargetDir)&quot;&#xD;&#xA;::设置要排除的文件格式,多个格式之间使用英文逗号隔开&#xD;&#xA;set Ext=dll&#xD;&#xA;::删除文件&#xD;&#xA;for /f &quot;delims=&quot; %25%25a in ('dir /a-d/s/b') do (&#xD;&#xA; if /i not &quot;%25%25~a&quot;==&quot;%25~f0&quot; (&#xD;&#xA; set &quot;Skip=&quot;&#xD;&#xA; for %25%25i in (%25Ext%25) do (&#xD;&#xA; if /i &quot;.%25%25~i&quot;==&quot;%25%25~xa&quot; (&#xD;&#xA; set Skip=OK&#xD;&#xA; )&#xD;&#xA; )&#xD;&#xA; if not defined Skip (&#xD;&#xA; del /f /q &quot;%25%25~a&quot;&#xD;&#xA; )&#xD;&#xA; )&#xD;&#xA;)&#xD;&#xA;&#xD;&#xA;for /d %25%25i in (*) do (&#xD;&#xA; rd /s /q &quot;%25%25i&quot;&#xD;&#xA;)&#xD;&#xA;&#xD;&#xA;" />
<Exec Command="@echo off&#xD;&#xA;setlocal enabledelayedexpansion&#xD;&#xA;&#xD;&#xA;set &quot;targetFWS=net6.0 net7.0 net8.0&quot;&#xD;&#xA;for %25%25f in (%25targetFWS%25) do (&#xD;&#xA; set &quot;dir=$(SolutionDir)bin\$(Configuration)\ThingsGateway.Web.Entry\%25%25f\Plugins\$(AssemblyName)&quot;&#xD;&#xA; if not exist &quot;!dir!&quot; md &quot;!dir!&quot;&#xD;&#xA; copy &quot;$(TargetDir)*QuestDB*.dll&quot; &quot;!dir!&quot;&#xD;&#xA;)&#xD;&#xA;&#xD;&#xA;endlocal&#xD;&#xA;" />
</Target>

View File

@@ -4,7 +4,7 @@
<Target Name="PostBuild" AfterTargets="PostBuildEvent">
<Exec Command=" set dir=&quot;$(SolutionDir)bin\$(Configuration)\ThingsGateway.Web.Entry\$(TargetFramework)\Plugins\$(AssemblyName)&quot;&#xD;&#xA; if not exist %25dir%25 md %25dir%25 &#xD;&#xA;copy &quot;$(TargetDir)*RabbitMQ*.dll&quot; %25dir%25&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;cd /d &quot;$(TargetDir)&quot;&#xD;&#xA;::设置要排除的文件格式,多个格式之间使用英文逗号隔开&#xD;&#xA;set Ext=dll&#xD;&#xA;::删除文件&#xD;&#xA;for /f &quot;delims=&quot; %25%25a in ('dir /a-d/s/b') do (&#xD;&#xA; if /i not &quot;%25%25~a&quot;==&quot;%25~f0&quot; (&#xD;&#xA; set &quot;Skip=&quot;&#xD;&#xA; for %25%25i in (%25Ext%25) do (&#xD;&#xA; if /i &quot;.%25%25~i&quot;==&quot;%25%25~xa&quot; (&#xD;&#xA; set Skip=OK&#xD;&#xA; )&#xD;&#xA; )&#xD;&#xA; if not defined Skip (&#xD;&#xA; del /f /q &quot;%25%25~a&quot;&#xD;&#xA; )&#xD;&#xA; )&#xD;&#xA;)&#xD;&#xA;&#xD;&#xA;for /d %25%25i in (*) do (&#xD;&#xA; rd /s /q &quot;%25%25i&quot;&#xD;&#xA;)&#xD;&#xA;" />
<Exec Command="@echo off&#xD;&#xA;setlocal enabledelayedexpansion&#xD;&#xA;&#xD;&#xA;set &quot;targetFWS=net6.0 net7.0 net8.0&quot;&#xD;&#xA;for %25%25f in (%25targetFWS%25) do (&#xD;&#xA; set &quot;dir=$(SolutionDir)bin\$(Configuration)\ThingsGateway.Web.Entry\%25%25f\Plugins\$(AssemblyName)&quot;&#xD;&#xA; if not exist &quot;!dir!&quot; md &quot;!dir!&quot;&#xD;&#xA; copy &quot;$(TargetDir)*RabbitMQ*.dll&quot; &quot;!dir!&quot;&#xD;&#xA;)&#xD;&#xA;&#xD;&#xA;endlocal&#xD;&#xA;" />
</Target>

View File

@@ -3,7 +3,7 @@
<Target Name="PostBuild" AfterTargets="PostBuildEvent">
<Exec Command=" set dir=&quot;$(SolutionDir)bin\$(Configuration)\ThingsGateway.Web.Entry\$(TargetFramework)\Plugins\$(AssemblyName)&quot;&#xD;&#xA; if not exist %25dir%25 md %25dir%25 &#xD;&#xA;copy &quot;$(TargetDir)*Siemens*.dll&quot; %25dir%25&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;cd /d &quot;$(TargetDir)&quot;&#xD;&#xA;::设置要排除的文件格式,多个格式之间使用英文逗号隔开&#xD;&#xA;set Ext=dll&#xD;&#xA;::删除文件&#xD;&#xA;for /f &quot;delims=&quot; %25%25a in ('dir /a-d/s/b') do (&#xD;&#xA; if /i not &quot;%25%25~a&quot;==&quot;%25~f0&quot; (&#xD;&#xA; set &quot;Skip=&quot;&#xD;&#xA; for %25%25i in (%25Ext%25) do (&#xD;&#xA; if /i &quot;.%25%25~i&quot;==&quot;%25%25~xa&quot; (&#xD;&#xA; set Skip=OK&#xD;&#xA; )&#xD;&#xA; )&#xD;&#xA; if not defined Skip (&#xD;&#xA; del /f /q &quot;%25%25~a&quot;&#xD;&#xA; )&#xD;&#xA; )&#xD;&#xA;)&#xD;&#xA;&#xD;&#xA;for /d %25%25i in (*) do (&#xD;&#xA; rd /s /q &quot;%25%25i&quot;&#xD;&#xA;)&#xD;&#xA;&#xD;&#xA;" />
<Exec Command="@echo off&#xD;&#xA;setlocal enabledelayedexpansion&#xD;&#xA;&#xD;&#xA;set &quot;targetFWS=net6.0 net7.0 net8.0&quot;&#xD;&#xA;for %25%25f in (%25targetFWS%25) do (&#xD;&#xA; set &quot;dir=$(SolutionDir)bin\$(Configuration)\ThingsGateway.Web.Entry\%25%25f\Plugins\$(AssemblyName)&quot;&#xD;&#xA; if not exist &quot;!dir!&quot; md &quot;!dir!&quot;&#xD;&#xA; copy &quot;$(TargetDir)*Siemens*.dll&quot; &quot;!dir!&quot;&#xD;&#xA;&#xD;&#xA;)&#xD;&#xA;&#xD;&#xA;endlocal&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
</Target>
<ItemGroup>

View File

@@ -3,7 +3,7 @@
<Target Name="PostBuild" AfterTargets="PostBuildEvent">
<Exec Command=" set dir=&quot;$(SolutionDir)bin\$(Configuration)\ThingsGateway.Web.Entry\$(TargetFramework)\Plugins\$(AssemblyName)&quot;&#xD;&#xA; if not exist %25dir%25 md %25dir%25 &#xD;&#xA;copy &quot;$(TargetDir)*SqlDB*.dll&quot; %25dir%25&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;cd /d &quot;$(TargetDir)&quot;&#xD;&#xA;::设置要排除的文件格式,多个格式之间使用英文逗号隔开&#xD;&#xA;set Ext=dll&#xD;&#xA;::删除文件&#xD;&#xA;for /f &quot;delims=&quot; %25%25a in ('dir /a-d/s/b') do (&#xD;&#xA; if /i not &quot;%25%25~a&quot;==&quot;%25~f0&quot; (&#xD;&#xA; set &quot;Skip=&quot;&#xD;&#xA; for %25%25i in (%25Ext%25) do (&#xD;&#xA; if /i &quot;.%25%25~i&quot;==&quot;%25%25~xa&quot; (&#xD;&#xA; set Skip=OK&#xD;&#xA; )&#xD;&#xA; )&#xD;&#xA; if not defined Skip (&#xD;&#xA; del /f /q &quot;%25%25~a&quot;&#xD;&#xA; )&#xD;&#xA; )&#xD;&#xA;)&#xD;&#xA;&#xD;&#xA;for /d %25%25i in (*) do (&#xD;&#xA; rd /s /q &quot;%25%25i&quot;&#xD;&#xA;)&#xD;&#xA;&#xD;&#xA;" />
<Exec Command="@echo off&#xD;&#xA;setlocal enabledelayedexpansion&#xD;&#xA;&#xD;&#xA;set &quot;targetFWS=net6.0 net7.0 net8.0&quot;&#xD;&#xA;for %25%25f in (%25targetFWS%25) do (&#xD;&#xA; set &quot;dir=$(SolutionDir)bin\$(Configuration)\ThingsGateway.Web.Entry\%25%25f\Plugins\$(AssemblyName)&quot;&#xD;&#xA; if not exist &quot;!dir!&quot; md &quot;!dir!&quot;&#xD;&#xA; copy &quot;$(TargetDir)*SqlDB*.dll&quot; &quot;!dir!&quot;&#xD;&#xA;)&#xD;&#xA;&#xD;&#xA;endlocal&#xD;&#xA;" />
</Target>

View File

@@ -4,7 +4,7 @@
<Target Name="PostBuild" AfterTargets="PostBuildEvent">
<Exec Command=" set dir=&quot;$(SolutionDir)bin\$(Configuration)\ThingsGateway.Web.Entry\$(TargetFramework)\Plugins\$(AssemblyName)&quot;&#xD;&#xA; if not exist %25dir%25 md %25dir%25 &#xD;&#xA;copy &quot;$(TargetDir)*SqlHisAlarm*.dll&quot; %25dir%25&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;cd /d &quot;$(TargetDir)&quot;&#xD;&#xA;::设置要排除的文件格式,多个格式之间使用英文逗号隔开&#xD;&#xA;set Ext=dll&#xD;&#xA;::删除文件&#xD;&#xA;for /f &quot;delims=&quot; %25%25a in ('dir /a-d/s/b') do (&#xD;&#xA; if /i not &quot;%25%25~a&quot;==&quot;%25~f0&quot; (&#xD;&#xA; set &quot;Skip=&quot;&#xD;&#xA; for %25%25i in (%25Ext%25) do (&#xD;&#xA; if /i &quot;.%25%25~i&quot;==&quot;%25%25~xa&quot; (&#xD;&#xA; set Skip=OK&#xD;&#xA; )&#xD;&#xA; )&#xD;&#xA; if not defined Skip (&#xD;&#xA; del /f /q &quot;%25%25~a&quot;&#xD;&#xA; )&#xD;&#xA; )&#xD;&#xA;)&#xD;&#xA;&#xD;&#xA;for /d %25%25i in (*) do (&#xD;&#xA; rd /s /q &quot;%25%25i&quot;&#xD;&#xA;)&#xD;&#xA;&#xD;&#xA;" />
<Exec Command="@echo off&#xD;&#xA;setlocal enabledelayedexpansion&#xD;&#xA;&#xD;&#xA;set &quot;targetFWS=net6.0 net7.0 net8.0&quot;&#xD;&#xA;for %25%25f in (%25targetFWS%25) do (&#xD;&#xA; set &quot;dir=$(SolutionDir)bin\$(Configuration)\ThingsGateway.Web.Entry\%25%25f\Plugins\$(AssemblyName)&quot;&#xD;&#xA; if not exist &quot;!dir!&quot; md &quot;!dir!&quot;&#xD;&#xA; copy &quot;$(TargetDir)*SqlHisAlarm*.dll&quot; &quot;!dir!&quot;&#xD;&#xA;)&#xD;&#xA;&#xD;&#xA;endlocal&#xD;&#xA;" />
</Target>

View File

@@ -3,7 +3,7 @@
<Target Name="PostBuild" AfterTargets="PostBuildEvent">
<Exec Command=" set dir=&quot;$(SolutionDir)bin\$(Configuration)\ThingsGateway.Web.Entry\$(TargetFramework)\Plugins\$(AssemblyName)&quot;&#xD;&#xA; if not exist %25dir%25 md %25dir%25 &#xD;&#xA;copy &quot;$(TargetDir)*TDengineDB*.dll&quot; %25dir%25&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;cd /d &quot;$(TargetDir)&quot;&#xD;&#xA;::设置要排除的文件格式,多个格式之间使用英文逗号隔开&#xD;&#xA;set Ext=dll&#xD;&#xA;::删除文件&#xD;&#xA;for /f &quot;delims=&quot; %25%25a in ('dir /a-d/s/b') do (&#xD;&#xA; if /i not &quot;%25%25~a&quot;==&quot;%25~f0&quot; (&#xD;&#xA; set &quot;Skip=&quot;&#xD;&#xA; for %25%25i in (%25Ext%25) do (&#xD;&#xA; if /i &quot;.%25%25~i&quot;==&quot;%25%25~xa&quot; (&#xD;&#xA; set Skip=OK&#xD;&#xA; )&#xD;&#xA; )&#xD;&#xA; if not defined Skip (&#xD;&#xA; del /f /q &quot;%25%25~a&quot;&#xD;&#xA; )&#xD;&#xA; )&#xD;&#xA;)&#xD;&#xA;&#xD;&#xA;for /d %25%25i in (*) do (&#xD;&#xA; rd /s /q &quot;%25%25i&quot;&#xD;&#xA;)&#xD;&#xA;&#xD;&#xA;" />
<Exec Command="@echo off&#xD;&#xA;setlocal enabledelayedexpansion&#xD;&#xA;&#xD;&#xA;set &quot;targetFWS=net6.0 net7.0 net8.0&quot;&#xD;&#xA;for %25%25f in (%25targetFWS%25) do (&#xD;&#xA; set &quot;dir=$(SolutionDir)bin\$(Configuration)\ThingsGateway.Web.Entry\%25%25f\Plugins\$(AssemblyName)&quot;&#xD;&#xA; if not exist &quot;!dir!&quot; md &quot;!dir!&quot;&#xD;&#xA; copy &quot;$(TargetDir)*TDengineDB*.dll&quot; &quot;!dir!&quot;&#xD;&#xA;)&#xD;&#xA;&#xD;&#xA;endlocal&#xD;&#xA;" />
</Target>

View File

@@ -3,7 +3,7 @@
<Target Name="PostBuild" AfterTargets="PostBuildEvent">
<Exec Command=" set dir=&quot;$(SolutionDir)bin\$(Configuration)\ThingsGateway.Web.Entry\$(TargetFramework)\Plugins\$(AssemblyName)&quot;&#xD;&#xA; if not exist %25dir%25 md %25dir%25 &#xD;&#xA;copy &quot;$(TargetDir)*VariableExpression*.dll&quot; %25dir%25&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;cd /d &quot;$(TargetDir)&quot;&#xD;&#xA;::设置要排除的文件格式,多个格式之间使用英文逗号隔开&#xD;&#xA;set Ext=dll&#xD;&#xA;::删除文件&#xD;&#xA;for /f &quot;delims=&quot; %25%25a in ('dir /a-d/s/b') do (&#xD;&#xA; if /i not &quot;%25%25~a&quot;==&quot;%25~f0&quot; (&#xD;&#xA; set &quot;Skip=&quot;&#xD;&#xA; for %25%25i in (%25Ext%25) do (&#xD;&#xA; if /i &quot;.%25%25~i&quot;==&quot;%25%25~xa&quot; (&#xD;&#xA; set Skip=OK&#xD;&#xA; )&#xD;&#xA; )&#xD;&#xA; if not defined Skip (&#xD;&#xA; del /f /q &quot;%25%25~a&quot;&#xD;&#xA; )&#xD;&#xA; )&#xD;&#xA;)&#xD;&#xA;&#xD;&#xA;for /d %25%25i in (*) do (&#xD;&#xA; rd /s /q &quot;%25%25i&quot;&#xD;&#xA;)&#xD;&#xA;&#xD;&#xA;" />
<Exec Command="@echo off&#xD;&#xA;setlocal enabledelayedexpansion&#xD;&#xA;&#xD;&#xA;set &quot;targetFWS=net6.0 net7.0 net8.0&quot;&#xD;&#xA;for %25%25f in (%25targetFWS%25) do (&#xD;&#xA; set &quot;dir=$(SolutionDir)bin\$(Configuration)\ThingsGateway.Web.Entry\%25%25f\Plugins\$(AssemblyName)&quot;&#xD;&#xA; if not exist &quot;!dir!&quot; md &quot;!dir!&quot;&#xD;&#xA; copy &quot;$(TargetDir)*VariableExpression*.dll&quot; &quot;!dir!&quot;&#xD;&#xA;&#xD;&#xA;)&#xD;&#xA;&#xD;&#xA;endlocal&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
</Target>