Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions NET/AdsMapperCli/AdsMapperCli.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,13 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<StartupObject>AdsMapperCli.Program</StartupObject>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Logging" Version="8.*" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="10.*" />
<PackageReference Include="NLog.Web.AspNetCore" Version="4.*" />
<PackageReference Include="System.Text.Json" Version="8.*" />
</ItemGroup>

<ItemGroup>
Expand Down
18 changes: 17 additions & 1 deletion NET/Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,23 @@ The following types of changes exist:
- **Fixed** for any bug fixes.
- **Security** in case of vulnerabilities.

## 2025 Summer, Version 5.0.1
## 2026 New Year, Version 5.2.0
### Removed
- Removed Support for .NET Framework 4.7.1 (But still .NET Standard 2.0.)
- Removed Dependency to Mbc.Hdf5Utils Nuget package. The code is now part of Mbc.Pcs.Net.DataRecorder.

### Added
- Support for .NET 10.0.
- Add Automatic recconection behavior in PlcAdsConnectionService
Copy link

Copilot AI Jan 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment contains a typo: "recconection" should be "reconnection".

Suggested change
- Add Automatic recconection behavior in PlcAdsConnectionService
- Add Automatic reconnection behavior in PlcAdsConnectionService

Copilot uses AI. Check for mistakes.

### Changed
- Update to Beckhoff.TwinCAT.Ads version 6.2.521

### Fixed
- fixed deadlock in PlcAdsConnectionService
- fixed handling PlcAdsStateReader when stop is called before start

## 2025 Summer, Version 5.1.0
### Feature
- It is now possible to write Structs with the `CommandInputBuilder` and the `PrimitiveCommandArgumentHandler`. Actually it results in multiple write commands to the PLC. So each struct and it fields will be recursively written to the PLC also in recursive structs. The fields in the struct has to be flagged with the `{attribute 'PlcCommandInput'}`. The Struct values must in c# be of type of `CommandInputBuilder`.
```C#
Expand Down
5 changes: 4 additions & 1 deletion NET/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,15 @@ limitations under the License.
<CodeAnalysisRuleSet>$(MSBuildProjectDirectory)\..\Build\Mbc.CodeAnalysis.ruleset</CodeAnalysisRuleSet>
<EnableNETAnalyzers>true</EnableNETAnalyzers>
<AnalysisLevel>latest</AnalysisLevel>
<_SkipUpgradeNetAnalyzersNuGetWarning>true</_SkipUpgradeNetAnalyzersNuGetWarning>
</PropertyGroup>
<ItemGroup>
<!-- Mark Analyzers as Private so it will not result in a dependency in the nuget -->
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers" Version="3.*">
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="8.*" />
<PackageReference Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="10.*" >
<PrivateAssets>all</PrivateAssets>
</PackageReference>
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion NET/Mbc.Ads.Helper.ReadType/Mbc.Ads.Helper.ReadType.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion NET/Mbc.Ads.Mapper.Test/Mbc.Ads.Mapper.Test.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<!-- common nuget configuration see Directory.Build.props-->
<TargetFrameworks>net471;net8.0</TargetFrameworks>
<TargetFrameworks>net10.0;net8.0</TargetFrameworks>
<Product>Mbc.Ads.Mapper.Test</Product>

<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
Expand Down
4 changes: 2 additions & 2 deletions NET/Mbc.Ads.Mapper/Mbc.Ads.Mapper.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<!-- common nuget configuration see Directory.Build.props-->
<TargetFrameworks>netstandard2.0;net471;net8.0</TargetFrameworks>
<Version>5.0.0.0</Version>
<TargetFrameworks>net10.0;net8.0;netstandard2.0</TargetFrameworks>
<Version>5.2.0</Version>

<Product>Mbc.Ads.Mapper</Product>

Expand Down
2 changes: 1 addition & 1 deletion NET/Mbc.Ads.Utils.Test/Mbc.Ads.Utils.Test.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<!-- common nuget configuration see Directory.Build.props-->
<TargetFrameworks>net471;net8.0</TargetFrameworks>
<TargetFrameworks>net10.0;net8.0</TargetFrameworks>
<Product>Mbc.Utils.Test</Product>

<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
Expand Down
4 changes: 2 additions & 2 deletions NET/Mbc.Ads.Utils/Mbc.Ads.Utils.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<!-- common nuget configuration see Directory.Build.props-->
<TargetFrameworks>netstandard2.0;net471;net8.0</TargetFrameworks>
<Version>5.1.0.0</Version>
<TargetFrameworks>net10.0;net8.0;netstandard2.0</TargetFrameworks>
<Version>5.2.0</Version>

<Product>Mbc.Ads.Utils</Product>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<!-- common nuget configuration see Directory.Build.props-->
<TargetFrameworks>net471;net8.0-windows</TargetFrameworks>
<Version>5.0.0.0</Version>
<TargetFrameworks>net10.0-windows;net8.0-windows</TargetFrameworks>
<Version>5.2.0</Version>

<OutputType>Exe</OutputType>
<ApplicationIcon>tceventbar.ico</ApplicationIcon>
Expand All @@ -19,9 +19,6 @@
<PackageReference Include="Microsoft.Extensions.CommandLineUtils" Version="1.1.1" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="NLog" Version="4.6.8" />
<PackageReference Include="System.Net.Http" Version="4.3.4" />
<PackageReference Include="System.Private.Uri" Version="4.3.2" />
<PackageReference Include="System.Text.RegularExpressions" Version="4.3.1" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<!-- common nuget configuration see Directory.Build.props-->
<TargetFrameworks>net471;net8.0-windows</TargetFrameworks>
<TargetFrameworks>net10.0-windows;net8.0-windows</TargetFrameworks>
<Product>Mbc.Pcs.Net.Alarm.Service.Test</Product>

<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
Expand All @@ -15,8 +15,6 @@
<PackageReference Include="FakeItEasy" Version="8.3.0" />
<PackageReference Include="AwesomeAssertions" Version="9.*" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
<PackageReference Include="System.Net.Http" Version="4.3.4" />
<PackageReference Include="System.Text.RegularExpressions" Version="4.3.1" />
<PackageReference Include="xunit" Version="2.9.2" />
<PackageReference Include="xunit.runner.visualstudio">
<Version>2.8.2</Version>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<!-- common nuget configuration see Directory.Build.props-->
<TargetFrameworks>net471;net8.0-windows</TargetFrameworks>
<Version>5.0.0.0</Version>
<TargetFrameworks>net10.0-windows;net8.0-windows</TargetFrameworks>
<Version>5.2.0</Version>

<Product>Mbc.Pcs.Net.Alarm.Service</Product>

Expand All @@ -13,16 +13,15 @@
<ItemGroup>
<!-- Include Mbc.Pcs.Net.Alarm.Mediator files into the package-->
<!-- $(TargetPlatformIdentifier) == windows; $(TargetPlatformVersion) == 7.0-->
<Content Include="$(OutputPath)net471/Mbc.Pcs.Net.Alarm.Mediator.exe" PackagePath="lib/net471" Visible="false" />
<Content Include="$(OutputPath)net8.0-windows/Mbc.Pcs.Net.Alarm.Mediator.exe" PackagePath="lib/net8.0-windows7.0" Visible="false" />
<Content Include="$(OutputPath)net10.0-windows/Mbc.Pcs.Net.Alarm.Mediator.exe" PackagePath="lib/net10.0-windows7.0" Visible="false" />
Comment on lines 16 to +17
Copy link

Copilot AI Jan 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing content package reference for the net10.0-windows platform. The pattern shows that content should be included for each target framework. Line 16 has the package for net8.0-windows7.0 and line 17 adds net10.0-windows, but the original line 16 for net471 was removed. Verify if the content packaging is correctly configured for all target frameworks.

Copilot uses AI. Check for mistakes.
<PackageReference Include="Mbc.Pcs.Net.TwinCat.EventLog" Version="1.0.2" />
<PackageReference Include="Microsoft.Extensions.CommandLineUtils" Version="1.1.1" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="NLog" Version="4.6.8" />
<PackageReference Include="System.Text.RegularExpressions" Version="4.3.1" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion NET/Mbc.Pcs.Net.Alarm.Test/Mbc.Pcs.Net.Alarm.Test.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<!-- common nuget configuration see Directory.Build.props-->
<TargetFrameworks>net471;net8.0</TargetFrameworks>
<TargetFrameworks>net10.0;net8.0</TargetFrameworks>
<Product>Mbc.Pcs.Net.Alarm.Test</Product>

<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
Expand Down
4 changes: 2 additions & 2 deletions NET/Mbc.Pcs.Net.Alarm/Mbc.Pcs.Net.Alarm.csproj
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<!-- common nuget configuration see Directory.Build.props-->
<TargetFrameworks>netstandard2.0;net471;net8.0</TargetFrameworks>
<Version>5.1.0.0</Version>
<TargetFrameworks>net10.0;net8.0;netstandard2.0</TargetFrameworks>
<Version>5.2.0</Version>

<Product>Mbc.Pcs.Net.Alarm</Product>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<!-- common nuget configuration see Directory.Build.props-->
<TargetFrameworks>net471;net8.0</TargetFrameworks>
<TargetFrameworks>net10.0;net8.0</TargetFrameworks>
<Product>Mbc.Pcs.Net.Command.Test</Product>

<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
Expand Down
4 changes: 2 additions & 2 deletions NET/Mbc.Pcs.Net.Command/Mbc.Pcs.Net.Command.csproj
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<!-- common nuget configuration see Directory.Build.props-->
<TargetFrameworks>netstandard2.0;net471;net8.0</TargetFrameworks>
<Version>5.0.0.0</Version>
<TargetFrameworks>net10.0;net8.0;netstandard2.0</TargetFrameworks>
<Version>5.2.0</Version>

<Product>Mbc.Pcs.Net.Command</Product>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using AwesomeAssertions;
using Mbc.Hdf5Utils;
using Mbc.Pcs.Net.DataRecorder.Hdf5RingBuffer;
using Mbc.Pcs.Net.DataRecorder.Hdf5Utils;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Logging.Abstractions;
using System.IO;
Expand Down
127 changes: 127 additions & 0 deletions NET/Mbc.Pcs.Net.DataRecorder.Test/Hdf5Utils/H5AttributeTest.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
using System;
using System.IO;
using System.Linq;
using AwesomeAssertions;
using Mbc.Pcs.Net.DataRecorder.Hdf5Utils;
using Mbc.Pcs.Net.DataRecorder.Test.Hdf5Utils.Utils;
using Xunit;

namespace Mbc.Pcs.Net.DataRecorder.Test.Hdf5Utils
{
[Collection("HDF5")]
public class H5AttributeTest : IDisposable
{
private readonly H5File _h5File;

public H5AttributeTest(Hdf5LibFixture hdf5Lib)
{
var file = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName());
File.Delete(file);
_h5File = new H5File(file, H5File.Flags.CreateOnly);
}

public void Dispose()
{
_h5File.Dispose();
}

[Fact]
public void WriteAndReadStringAttribute()
{
// Arrange
var attribute = new H5Attribute(_h5File);

// Act
attribute.Write("foo", "bar");
var attrValue = attribute.ReadString("foo");

// Assert
attrValue.Should().Be("bar");
}

[Fact]
public void WriteAndReadIntAttribute()
{
// Arrange
var attribute = new H5Attribute(_h5File);

// Act
attribute.Write("foo", 42);
var attrValue = attribute.ReadInt("foo");

// Assert
attrValue.Should().Be(42);
}

[Fact]
public void WriteAndReadDoubleAttribute()
{
// Arrange
var attribute = new H5Attribute(_h5File);

// Act
attribute.Write("foo", 42d);
var attrValue = attribute.ReadDouble("foo");

// Assert
attrValue.Should().Be(42d);
}

[Fact]
public void WriteShortAndReadIntAttribute()
{
// Arrange
var attribute = new H5Attribute(_h5File);

// Act
attribute.Write("foo", (ushort)60000);
var attrValue = attribute.ReadInt("foo");

// Assert
attrValue.Should().Be(60000);
}

[Fact]
public void ReadObjectAttribute()
{
// Arrange
var attribute = new H5Attribute(_h5File);
attribute.Write("foo", "bar");

// Act
var attrValue = attribute.Read("foo");

// Assert
attrValue.Should().BeAssignableTo<string>().Which.Should().Be("bar");
}

[Fact]
public void ListAttributeNames()
{
// Arrange
var attribute = new H5Attribute(_h5File);
attribute.Write("foo", "bar");
attribute.Write("baz", "bar");

// Act
var names = attribute.GetAttributeNames().ToList();

// Assert
names.Should().BeEquivalentTo("foo", "baz");
}

[Fact]
public void ReWriteAttribute()
{
// Arrange
var attribute = new H5Attribute(_h5File);
attribute.Write("foo", 1);

// Act
attribute.Write("foo", 2);

// Assert
attribute.ReadInt("foo").Should().Be(2);
}
}
}
Loading