Skip to content

Support for .NET 10.0.#16

Merged
bqstony merged 1 commit intonoserfrom
support_net10
Jan 4, 2026
Merged

Support for .NET 10.0.#16
bqstony merged 1 commit intonoserfrom
support_net10

Conversation

@bqstony
Copy link
Member

@bqstony 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.
Copilot AI review requested due to automatic review settings January 4, 2026 19:04
@bqstony bqstony merged commit ec0f13a into noser Jan 4, 2026
6 checks passed
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 -->
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 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.

Copilot uses AI. Check for mistakes.
Comment on lines 16 to +17
<!-- $(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" />
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.
<PropertyGroup>
<!-- common nuget configuration see Directory.Build.props-->
<TargetFrameworks>net471;net8.0</TargetFrameworks>
<TargetFrameworks>net10.0;net8.0</TargetFrameworks>
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.

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.

Copilot uses AI. Check for mistakes.

### 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.
# Visual Studio Version 17
VisualStudioVersion = 17.10.34928.147
# Visual Studio Version 18
VisualStudioVersion = 18.1.11312.151 d18.0
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 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.

Copilot uses AI. Check for mistakes.
{
public static class H5Utils
{
private static object _initLock = new object();
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.

Field '_initLock' can be 'readonly'.

Copilot uses AI. Check for mistakes.
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>
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.

Field '_nativeTypes' can be 'readonly'.

Copilot uses AI. Check for mistakes.
Comment on lines +132 to +139
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);
}
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.

Both branches of this 'if' statement write to the same variable - consider using '?' to express intent better.

Copilot uses AI. Check for mistakes.
Comment on lines +26 to +33
if ((flags & (Flags.CreateOnly | Flags.OpenOrCreate)) != 0)
{
Id = H5Error.CheckH5Result(H5F.create(filename, (uint)flags));
}
else
{
Id = H5Error.CheckH5Result(H5F.open(filename, (uint)flags));
}
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.

Both branches of this 'if' statement write to the same variable - consider using '?' to express intent better.

Copilot uses AI. Check for mistakes.
Comment on lines +84 to +87
if (_errors.Count == 0)
exc = new H5Error(msg);
else
exc = new H5Error(msg, _errors.Last());
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.

Both branches of this 'if' statement write to the same variable - consider using '?' to express intent better.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments