Skip to content

Commit ff332aa

Browse files
authored
Merge pull request #4569 from LuckyPennySoftware/direct-net4x-support
Direct .NET 4.x support
2 parents dd48f73 + c215fa7 commit ff332aa

File tree

4 files changed

+24
-10
lines changed

4 files changed

+24
-10
lines changed

.github/workflows/ci.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,10 @@ on:
55
branches:
66
- master
77
pull_request:
8-
branches:
9-
- master
8+
env:
9+
DOTNET_NOLOGO: true
10+
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
11+
MINVERBUILDMETADATA: build.${{ github.run_id }}.${{ github.run_attempt}}
1012
permissions:
1113
contents: read
1214
concurrency:
@@ -19,7 +21,7 @@ jobs:
1921
runs-on: windows-latest
2022
steps:
2123
- name: Checkout
22-
uses: actions/checkout@v4
24+
uses: actions/checkout@v4.2.0
2325
with:
2426
fetch-depth: 0
2527
- name: Setup dotnet
@@ -44,7 +46,7 @@ jobs:
4446
runs-on: ubuntu-latest
4547
steps:
4648
- name: Checkout
47-
uses: actions/checkout@v4
49+
uses: actions/checkout@v4.2.0
4850
with:
4951
fetch-depth: 0
5052
- name: Setup dotnet
@@ -57,6 +59,7 @@ jobs:
5759
run: ./Build.ps1
5860
shell: pwsh
5961
- name: Push to MyGet
62+
if: github.ref == 'refs/heads/master'
6063
env:
6164
NUGET_URL: https://f.feedz.io/lucky-penny-software/automapper/nuget/index.json
6265
NUGET_API_KEY: ${{ secrets.FEEDZIO_ACCESS_TOKEN }}

src/AutoMapper/AutoMapper.csproj

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@
2929
<AdditionalApiCompatOptions>--exclude-non-browsable --exclude-compiler-generated</AdditionalApiCompatOptions>
3030
</PropertyGroup>
3131

32+
<PropertyGroup Condition=" '$(IsWindows)' == 'true' ">
33+
<TargetFrameworks>$(TargetFrameworks);net462</TargetFrameworks>
34+
</PropertyGroup>
35+
3236
<ItemGroup>
3337
<ResolvedMatchingContract Include="..\LastMajorVersionBinary\AutoMapper.dll"/>
3438
</ItemGroup>
@@ -40,7 +44,7 @@
4044
</ItemGroup>
4145

4246
<ItemGroup>
43-
<PackageReference Include="Microsoft.Extensions.Logging" Version="[8.0.0, )"/>
47+
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="[8.0.0, )"/>
4448
<PackageReference Include="Microsoft.Extensions.Options" Version="[8.0.0, )"/>
4549
<PackageReference Include="Microsoft.IdentityModel.JsonWebTokens" Version="[8.0.1, )"/>
4650
<PackageReference Include="Microsoft.Bcl.HashCode" Version="[6.0.0, )" Condition="'$(TargetFramework)' == 'netstandard2.0'" />

src/IntegrationTests/AutoMapper.IntegrationTests.csproj

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net9.0</TargetFramework>
4+
<TargetFrameworks>net9.0</TargetFrameworks>
55
<NoWarn>$(NoWarn);618</NoWarn>
66
<AssemblyOriginatorKeyFile>..\..\AutoMapper.snk</AssemblyOriginatorKeyFile>
77
<SignAssembly>true</SignAssembly>
8-
<PublicSign Condition=" '$(OS)' != 'Windows_NT' ">true</PublicSign>
8+
</PropertyGroup>
9+
10+
<PropertyGroup Condition=" '$(IsWindows)' == 'true' ">
11+
<PublicSign>true</PublicSign>
12+
<TargetFrameworks>$(TargetFrameworks);net462</TargetFrameworks>
913
</PropertyGroup>
1014

1115
<ItemGroup>

src/UnitTests/AutoMapper.UnitTests.csproj

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework Condition=" '$(OS)' != 'Windows_NT' ">net9.0</TargetFramework>
5-
<TargetFrameworks Condition=" '$(OS)' == 'Windows_NT' ">net481;net9.0</TargetFrameworks>
4+
<TargetFrameworks>net9.0</TargetFrameworks>
65
<NoWarn>$(NoWarn);649;618</NoWarn>
76
<AssemblyOriginatorKeyFile>..\..\AutoMapper.snk</AssemblyOriginatorKeyFile>
87
<SignAssembly>true</SignAssembly>
9-
<PublicSign Condition=" '$(OS)' != 'Windows_NT' ">true</PublicSign>
108
</PropertyGroup>
119

10+
<PropertyGroup Condition=" '$(IsWindows)' == 'true' ">
11+
<PublicSign>true</PublicSign>
12+
<TargetFrameworks>$(TargetFrameworks);net462</TargetFrameworks>
13+
</PropertyGroup>
14+
1215
<ItemGroup>
1316
<ProjectReference Include="..\AutoMapper\AutoMapper.csproj" />
1417
<PackageReference Include="Microsoft.Extensions.Diagnostics.Testing" Version="9.6.0" />

0 commit comments

Comments
 (0)