diff --git a/src/Mapster.Core/Mapster.Core.csproj b/src/Mapster.Core/Mapster.Core.csproj index df7ee33b..e4407cc9 100644 --- a/src/Mapster.Core/Mapster.Core.csproj +++ b/src/Mapster.Core/Mapster.Core.csproj @@ -1,7 +1,7 @@  Lightweight library for Mapster and Mapster CodeGen - net7.0;net6.0 + net7.0;net6.0;netstandard2.0 Mapster.Core mapster 1.2.1 diff --git a/src/Mapster/Interfaces/IMapFrom.cs b/src/Mapster/Interfaces/IMapFrom.cs index f1b004c7..623b0595 100644 --- a/src/Mapster/Interfaces/IMapFrom.cs +++ b/src/Mapster/Interfaces/IMapFrom.cs @@ -2,8 +2,12 @@ namespace Mapster; public interface IMapFrom { + +#if NET6_0_OR_GREATER public void ConfigureMapping(TypeAdapterConfig config) { config.NewConfig(typeof(TSource), GetType()); } +#endif + } \ No newline at end of file diff --git a/src/Mapster/Mapster.csproj b/src/Mapster/Mapster.csproj index 6526c895..6be0a5c0 100644 --- a/src/Mapster/Mapster.csproj +++ b/src/Mapster/Mapster.csproj @@ -4,7 +4,7 @@ A fast, fun and stimulating object to object mapper. Kind of like AutoMapper, just simpler and way, way faster. Copyright (c) 2016 Chaowlert Chaisrichalermpol, Eric Swann chaowlert;eric_swann - net7.0;net6.0 + net7.0;net6.0;netstandard2.0 Mapster A fast, fun and stimulating object to object mapper. Kind of like AutoMapper, just simpler and way, way faster. Mapster @@ -26,6 +26,10 @@ + + + + diff --git a/src/Mapster/Utils/ReflectionUtils.cs b/src/Mapster/Utils/ReflectionUtils.cs index 5959daa5..d8967720 100644 --- a/src/Mapster/Utils/ReflectionUtils.cs +++ b/src/Mapster/Utils/ReflectionUtils.cs @@ -385,4 +385,9 @@ public static bool IsInitOnly(this PropertyInfo propertyInfo) return setMethod.ReturnParameter.GetRequiredCustomModifiers().Contains(isExternalInitType); } } +} + +namespace System.Runtime.CompilerServices +{ + internal static class IsExternalInit { } } \ No newline at end of file