From d3a3fe8972ff307d0ec8b49caccc363d7dcf6c06 Mon Sep 17 00:00:00 2001 From: DocSvartz Date: Wed, 25 Mar 2026 14:49:25 +0500 Subject: [PATCH 1/3] feat(build): Consolidate TFMs --- src/Directory.Build.props | 4 ++++ src/Mapster.Async/Mapster.Async.csproj | 2 +- .../Mapster.DependencyInjection.csproj | 2 +- src/Mapster.EFCore/Mapster.EFCore.csproj | 2 +- src/Mapster.Immutable/Mapster.Immutable.csproj | 2 +- src/Mapster.JsonNet/Mapster.JsonNet.csproj | 2 +- src/Mapster.Tool/Mapster.Tool.csproj | 2 +- src/Mapster/Mapster.csproj | 2 +- 8 files changed, 11 insertions(+), 7 deletions(-) diff --git a/src/Directory.Build.props b/src/Directory.Build.props index efb4ec43..ec8b8ee8 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -3,6 +3,10 @@ false 10.0.4 + netstandard2.0;netstandard2.1;net10.0;net9.0;net8.0 + netstandard2.0;netstandard2.1;net10.0;net9.0;net8.0 + net10.0;net9.0;net8.0 + net10.0;net9.0;net8.0 diff --git a/src/Mapster.Async/Mapster.Async.csproj b/src/Mapster.Async/Mapster.Async.csproj index ccf06f21..5ece3100 100644 --- a/src/Mapster.Async/Mapster.Async.csproj +++ b/src/Mapster.Async/Mapster.Async.csproj @@ -1,7 +1,7 @@  - netstandard2.0;net10.0;net9.0;net8.0 + $(MapsterPluginsTFMs) Async supports for Mapster true Mapster;Async diff --git a/src/Mapster.DependencyInjection/Mapster.DependencyInjection.csproj b/src/Mapster.DependencyInjection/Mapster.DependencyInjection.csproj index f27349f7..3c4f5d5a 100644 --- a/src/Mapster.DependencyInjection/Mapster.DependencyInjection.csproj +++ b/src/Mapster.DependencyInjection/Mapster.DependencyInjection.csproj @@ -1,7 +1,7 @@  - netstandard2.0;net10.0;net9.0;net8.0 + $(MapsterPluginsTFMs) Dependency Injection supports for Mapster true Mapster;DependencyInjection diff --git a/src/Mapster.EFCore/Mapster.EFCore.csproj b/src/Mapster.EFCore/Mapster.EFCore.csproj index 4bb8809f..7e7922d3 100644 --- a/src/Mapster.EFCore/Mapster.EFCore.csproj +++ b/src/Mapster.EFCore/Mapster.EFCore.csproj @@ -1,7 +1,7 @@  - net10.0;net9.0;net8.0; + $(MapsterEFCoreTFMs) EFCore plugin for Mapster true Mapster;EFCore diff --git a/src/Mapster.Immutable/Mapster.Immutable.csproj b/src/Mapster.Immutable/Mapster.Immutable.csproj index ed91137f..8887adec 100644 --- a/src/Mapster.Immutable/Mapster.Immutable.csproj +++ b/src/Mapster.Immutable/Mapster.Immutable.csproj @@ -1,7 +1,7 @@  - netstandard2.0;net10.0;net9.0;net8.0 + $(MapsterPluginsTFMs) Immutable collection supports for Mapster true Mapster;Immutable diff --git a/src/Mapster.JsonNet/Mapster.JsonNet.csproj b/src/Mapster.JsonNet/Mapster.JsonNet.csproj index 3524467c..703726ac 100644 --- a/src/Mapster.JsonNet/Mapster.JsonNet.csproj +++ b/src/Mapster.JsonNet/Mapster.JsonNet.csproj @@ -1,7 +1,7 @@  - netstandard2.0;net10.0;net9.0;net8.0 + $(MapsterPluginsTFMs) Json.net conversion supports for Mapster true Mapster;Json.net diff --git a/src/Mapster.Tool/Mapster.Tool.csproj b/src/Mapster.Tool/Mapster.Tool.csproj index 20e678c1..9d4e64a6 100644 --- a/src/Mapster.Tool/Mapster.Tool.csproj +++ b/src/Mapster.Tool/Mapster.Tool.csproj @@ -2,7 +2,7 @@ Exe - net10.0;net9.0;net8.0; + $(MapsterToolTFMs) true true dotnet-mapster diff --git a/src/Mapster/Mapster.csproj b/src/Mapster/Mapster.csproj index e6b79780..930cf61b 100644 --- a/src/Mapster/Mapster.csproj +++ b/src/Mapster/Mapster.csproj @@ -1,7 +1,7 @@  - netstandard2.0;net10.0;net9.0;net8.0 + $(MapsterTFMs) Mapster A fast, fun and stimulating object to object mapper. Kind of like AutoMapper, just simpler and way, way faster. Mapster From 3f05df6e8d3d27b2ea9614328742bd427cd8d583 Mon Sep 17 00:00:00 2001 From: DocSvartz Date: Wed, 25 Mar 2026 14:54:25 +0500 Subject: [PATCH 2/3] fix: #893 --- src/Directory.Build.props | 4 ++-- src/Mapster/Utils/CodeAnalysisAttributes.cs | 4 ++-- src/Mapster/Utils/CoreExtensions.cs | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Directory.Build.props b/src/Directory.Build.props index ec8b8ee8..17e76a5d 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -3,8 +3,8 @@ false 10.0.4 - netstandard2.0;netstandard2.1;net10.0;net9.0;net8.0 - netstandard2.0;netstandard2.1;net10.0;net9.0;net8.0 + netstandard2.0;net10.0;net9.0;net8.0 + netstandard2.0;net10.0;net9.0;net8.0 net10.0;net9.0;net8.0 net10.0;net9.0;net8.0 diff --git a/src/Mapster/Utils/CodeAnalysisAttributes.cs b/src/Mapster/Utils/CodeAnalysisAttributes.cs index 212fb714..a2a4b487 100644 --- a/src/Mapster/Utils/CodeAnalysisAttributes.cs +++ b/src/Mapster/Utils/CodeAnalysisAttributes.cs @@ -4,14 +4,14 @@ namespace System.Diagnostics.CodeAnalysis { [AttributeUsage(AttributeTargets.Parameter, Inherited = false)] - public sealed class NotNullWhenAttribute : Attribute + internal sealed class NotNullWhenAttribute : Attribute { public NotNullWhenAttribute(bool returnValue) => ReturnValue = returnValue; public bool ReturnValue { get; } } [AttributeUsage(AttributeTargets.Parameter | AttributeTargets.ReturnValue, Inherited = false)] - public sealed class NotNullIfNotNullAttribute : Attribute + internal sealed class NotNullIfNotNullAttribute : Attribute { public NotNullIfNotNullAttribute(string parameterName) => ParameterName = parameterName; public string ParameterName { get; } diff --git a/src/Mapster/Utils/CoreExtensions.cs b/src/Mapster/Utils/CoreExtensions.cs index e5866402..c2799f92 100644 --- a/src/Mapster/Utils/CoreExtensions.cs +++ b/src/Mapster/Utils/CoreExtensions.cs @@ -25,7 +25,7 @@ public static void LockRemove(this List list, T item) } } -#if !NET6_0_OR_GREATER +#if NETSTANDARD2_0 public static HashSet ToHashSet(this IEnumerable source) { return new HashSet(source); From 0721ae024cfb230a00b077ef6a5362af7209a922 Mon Sep 17 00:00:00 2001 From: DocSvartz Date: Wed, 25 Mar 2026 15:37:50 +0500 Subject: [PATCH 3/3] chore: Bump Version to 10.0.5 --- src/Directory.Build.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Directory.Build.props b/src/Directory.Build.props index 17e76a5d..3efb4b24 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -2,7 +2,7 @@ false - 10.0.4 + 10.0.5 netstandard2.0;net10.0;net9.0;net8.0 netstandard2.0;net10.0;net9.0;net8.0 net10.0;net9.0;net8.0