Conversation
bqstony
commented
Jan 4, 2026
- Support for .NET 10.0.
- 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.
- 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.
There was a problem hiding this comment.
Pull request overview
This PR adds support for .NET 10.0 while removing .NET Framework 4.7.1 support (though .NET Standard 2.0 is retained). The code from the Mbc.Hdf5Utils NuGet package has been internalized into the Mbc.Pcs.Net.DataRecorder project.
Key changes:
- All projects updated from .NET Framework 4.7.1 to .NET 10.0
- Version bumped to 5.2.0 across all projects
- Hdf5Utils code moved from external NuGet package into Mbc.Pcs.Net.DataRecorder namespace
- Profiling sample project relocated to Samples folder
Reviewed changes
Copilot reviewed 51 out of 52 changed files in this pull request and generated 104 comments.
Show a summary per file
| File | Description |
|---|---|
| NET/Samples/Profiling/Program.cs | New profiling sample with FileRingBuffer usage |
| NET/Samples/Profiling/Profiling.csproj | Project file for profiling sample targeting net10.0 |
| NET/Samples/Cli/Cli.csproj | Updated to target net10.0 and updated package versions |
| NET/Profiling/* | Old .NET Framework 4.7.1 profiling project removed |
| NET/Mbc.Pcs.Net/Mbc.Pcs.Net.csproj | Updated target frameworks and version |
| NET/Mbc.Pcs.Net.sln | Updated Visual Studio version and profiling project reference |
| NET/Mbc.Pcs.Net.Test/Mbc.Pcs.Net.Test.csproj | Removed net471, added net10.0 |
| NET/Mbc.Pcs.Net.Test.Util/Mbc.Pcs.Net.Test.Util.csproj | Updated target frameworks with consistent ordering |
| NET/Mbc.Pcs.Net.DataRecorder/Mbc.Pcs.Net.DataRecorder.csproj | Added unsafe blocks, conditional serialization config, HDF package reference |
| NET/Mbc.Pcs.Net.DataRecorder/Hdf5Utils/* | Internalized Hdf5Utils code including H5File, H5DataSet, H5Attribute, etc. |
| NET/Mbc.Pcs.Net.DataRecorder.Test/Mbc.Pcs.Net.DataRecorder.Test.csproj | Updated frameworks, removed Mbc.Hdf5Utils dependency |
| NET/Mbc.Pcs.Net.DataRecorder.Test/Hdf5Utils/* | New test files for internalized Hdf5Utils |
| NET/Mbc.Pcs.Net.Command/Mbc.Pcs.Net.Command.csproj | Updated target frameworks and version |
| NET/Mbc.Pcs.Net.Alarm./Mbc.Pcs.Net.Alarm..csproj | Updated to net10.0 across all Alarm projects |
| NET/Mbc.Ads./Mbc.Ads..csproj | Updated to net10.0 across all Ads projects |
| NET/Directory.Build.props | Updated analyzer packages to version 10.* |
| NET/Changelog.md | Added version 5.2.0 changelog entry |
| NET/AdsMapperCli/AdsMapperCli.csproj | Updated to net10.0 and package versions |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| <AllowUnsafeBlocks>true</AllowUnsafeBlocks> | ||
| </PropertyGroup> | ||
|
|
||
| <!-- Only for .NET 8.0 and newer --> |
There was a problem hiding this comment.
The comment says "Only for .NET 8.0 and newer" but the condition only applies to .NET 10.0. This is inconsistent. Either update the comment to say "Only for .NET 10.0" or update the condition to include .NET 8.0 and newer frameworks as the comment suggests.
| <!-- $(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" /> |
There was a problem hiding this comment.
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.
| <PropertyGroup> | ||
| <!-- common nuget configuration see Directory.Build.props--> | ||
| <TargetFrameworks>net471;net8.0</TargetFrameworks> | ||
| <TargetFrameworks>net10.0;net8.0</TargetFrameworks> |
There was a problem hiding this comment.
Inconsistent ordering: The TargetFrameworks should follow a consistent pattern across all project files. Some files use "net10.0;net8.0;netstandard2.0" (newest first) while this file uses "net10.0;net8.0" but other similar files have different patterns. Consider establishing a consistent ordering convention, preferably with the newest framework first.
|
|
||
| ### Added | ||
| - Support for .NET 10.0. | ||
| - Add Automatic recconection behavior in PlcAdsConnectionService |
There was a problem hiding this comment.
The comment contains a typo: "recconection" should be "reconnection".
| - Add Automatic recconection behavior in PlcAdsConnectionService | |
| - Add Automatic reconnection behavior in PlcAdsConnectionService |
| # Visual Studio Version 17 | ||
| VisualStudioVersion = 17.10.34928.147 | ||
| # Visual Studio Version 18 | ||
| VisualStudioVersion = 18.1.11312.151 d18.0 |
There was a problem hiding this comment.
The Visual Studio version "18.1.11312.151 d18.0" appears unusual. The format "d18.0" at the end is non-standard for Visual Studio version strings. Please verify this is the correct version identifier, as it may cause compatibility issues or confusion.
| { | ||
| public static class H5Utils | ||
| { | ||
| private static object _initLock = new object(); |
There was a problem hiding this comment.
Field '_initLock' can be 'readonly'.
| public static readonly H5Type UIntType = new H5Type(H5T.NATIVE_UINT); | ||
| public static readonly H5Type ULongType = new H5Type(H5T.NATIVE_UINT64); | ||
|
|
||
| private static Dictionary<Type, H5Type> _nativeTypes = new Dictionary<Type, H5Type> |
There was a problem hiding this comment.
Field '_nativeTypes' can be 'readonly'.
| if (H5Error.CheckH5Result(H5A.exists(_locId, name)) > 0) | ||
| { | ||
| attribute = new H5Id(H5A.open(_locId, name), H5A.close); | ||
| } | ||
| else | ||
| { | ||
| attribute = new H5Id(H5A.create(_locId, name, h5NativeTypeId, dspace), H5A.close); | ||
| } |
There was a problem hiding this comment.
Both branches of this 'if' statement write to the same variable - consider using '?' to express intent better.
| if ((flags & (Flags.CreateOnly | Flags.OpenOrCreate)) != 0) | ||
| { | ||
| Id = H5Error.CheckH5Result(H5F.create(filename, (uint)flags)); | ||
| } | ||
| else | ||
| { | ||
| Id = H5Error.CheckH5Result(H5F.open(filename, (uint)flags)); | ||
| } |
There was a problem hiding this comment.
Both branches of this 'if' statement write to the same variable - consider using '?' to express intent better.
| if (_errors.Count == 0) | ||
| exc = new H5Error(msg); | ||
| else | ||
| exc = new H5Error(msg, _errors.Last()); |
There was a problem hiding this comment.
Both branches of this 'if' statement write to the same variable - consider using '?' to express intent better.