Skip to content

Commit c4f77eb

Browse files
Blogbotanaclaude
andcommitted
Remove R2019 support and fix build warnings
- Drop R2019 from Build.props and solution (minimum is now R2020) - Condition System.Threading.Tasks.Extensions to non-net8.0-windows targets - Remove hardcoded TargetFramework/Nullable/ImplicitUsings from test project (Build.props already sets these per configuration) - Suppress MSB3277 for net47/net48 in tests (FluentAssertions System.Net.Http version conflict is harmless; tests only run under R2025/net8.0) - Add R2020 to CI/CD build matrix; drop spurious 4.8.x from dotnet-version setup Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent e4f0cde commit c4f77eb

7 files changed

Lines changed: 60 additions & 56 deletions

File tree

.github/workflows/cd.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
strategy:
1313
fail-fast: false
1414
matrix:
15-
configuration: [R2021, R2022, R2023, R2024, R2025, R2026]
15+
configuration: [R2020, R2021, R2022, R2023, R2024, R2025, R2026]
1616

1717
steps:
1818
- name: Checkout
@@ -21,9 +21,7 @@ jobs:
2121
- name: Setup .NET
2222
uses: actions/setup-dotnet@v4
2323
with:
24-
dotnet-version: |
25-
8.0.x
26-
4.8.x
24+
dotnet-version: 8.0.x
2725

2826
- name: Restore
2927
run: dotnet restore source/Apibim.Revit.Extensions/Apibim.Revit.Extensions.csproj -c ${{ matrix.configuration }}

.github/workflows/ci.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
strategy:
1414
fail-fast: false
1515
matrix:
16-
configuration: [R2021, R2022, R2023, R2024, R2025, R2026]
16+
configuration: [R2020, R2021, R2022, R2023, R2024, R2025, R2026]
1717

1818
steps:
1919
- name: Checkout
@@ -22,9 +22,7 @@ jobs:
2222
- name: Setup .NET
2323
uses: actions/setup-dotnet@v4
2424
with:
25-
dotnet-version: |
26-
8.0.x
27-
4.8.x
25+
dotnet-version: 8.0.x
2826

2927
- name: Restore
3028
run: dotnet restore source/Apibim.Revit.Extensions/Apibim.Revit.Extensions.csproj -c ${{ matrix.configuration }}

Apibim.Revit.Extensions.sln

Lines changed: 40 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -13,38 +13,48 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Apibim.Revit.Extensions.Tes
1313
EndProject
1414
Global
1515
GlobalSection(SolutionConfigurationPlatforms) = preSolution
16-
Debug|Any CPU = Debug|Any CPU
17-
Debug|x64 = Debug|x64
18-
Debug|x86 = Debug|x86
19-
Release|Any CPU = Release|Any CPU
20-
Release|x64 = Release|x64
21-
Release|x86 = Release|x86
16+
R2020|Any CPU = R2020|Any CPU
17+
R2021|Any CPU = R2021|Any CPU
18+
R2022|Any CPU = R2022|Any CPU
19+
R2023|Any CPU = R2023|Any CPU
20+
R2024|Any CPU = R2024|Any CPU
21+
R2025|Any CPU = R2025|Any CPU
22+
R2026|Any CPU = R2026|Any CPU
23+
R2027|Any CPU = R2027|Any CPU
2224
EndGlobalSection
2325
GlobalSection(ProjectConfigurationPlatforms) = postSolution
24-
{C5E9459C-38FB-4F95-98BD-FFBB9B075D7A}.Debug|Any CPU.ActiveCfg = R2019|Any CPU
25-
{C5E9459C-38FB-4F95-98BD-FFBB9B075D7A}.Debug|Any CPU.Build.0 = R2019|Any CPU
26-
{C5E9459C-38FB-4F95-98BD-FFBB9B075D7A}.Debug|x64.ActiveCfg = R2019|Any CPU
27-
{C5E9459C-38FB-4F95-98BD-FFBB9B075D7A}.Debug|x64.Build.0 = R2019|Any CPU
28-
{C5E9459C-38FB-4F95-98BD-FFBB9B075D7A}.Debug|x86.ActiveCfg = R2019|Any CPU
29-
{C5E9459C-38FB-4F95-98BD-FFBB9B075D7A}.Debug|x86.Build.0 = R2019|Any CPU
30-
{C5E9459C-38FB-4F95-98BD-FFBB9B075D7A}.Release|Any CPU.ActiveCfg = R2019|Any CPU
31-
{C5E9459C-38FB-4F95-98BD-FFBB9B075D7A}.Release|Any CPU.Build.0 = R2019|Any CPU
32-
{C5E9459C-38FB-4F95-98BD-FFBB9B075D7A}.Release|x64.ActiveCfg = R2019|Any CPU
33-
{C5E9459C-38FB-4F95-98BD-FFBB9B075D7A}.Release|x64.Build.0 = R2019|Any CPU
34-
{C5E9459C-38FB-4F95-98BD-FFBB9B075D7A}.Release|x86.ActiveCfg = R2019|Any CPU
35-
{C5E9459C-38FB-4F95-98BD-FFBB9B075D7A}.Release|x86.Build.0 = R2019|Any CPU
36-
{18101238-64C3-4441-9B9B-04590F5286DE}.Debug|Any CPU.ActiveCfg = R2019|Any CPU
37-
{18101238-64C3-4441-9B9B-04590F5286DE}.Debug|Any CPU.Build.0 = R2019|Any CPU
38-
{18101238-64C3-4441-9B9B-04590F5286DE}.Debug|x64.ActiveCfg = R2019|Any CPU
39-
{18101238-64C3-4441-9B9B-04590F5286DE}.Debug|x64.Build.0 = R2019|Any CPU
40-
{18101238-64C3-4441-9B9B-04590F5286DE}.Debug|x86.ActiveCfg = R2019|Any CPU
41-
{18101238-64C3-4441-9B9B-04590F5286DE}.Debug|x86.Build.0 = R2019|Any CPU
42-
{18101238-64C3-4441-9B9B-04590F5286DE}.Release|Any CPU.ActiveCfg = R2019|Any CPU
43-
{18101238-64C3-4441-9B9B-04590F5286DE}.Release|Any CPU.Build.0 = R2019|Any CPU
44-
{18101238-64C3-4441-9B9B-04590F5286DE}.Release|x64.ActiveCfg = R2019|Any CPU
45-
{18101238-64C3-4441-9B9B-04590F5286DE}.Release|x64.Build.0 = R2019|Any CPU
46-
{18101238-64C3-4441-9B9B-04590F5286DE}.Release|x86.ActiveCfg = R2019|Any CPU
47-
{18101238-64C3-4441-9B9B-04590F5286DE}.Release|x86.Build.0 = R2019|Any CPU
26+
{C5E9459C-38FB-4F95-98BD-FFBB9B075D7A}.R2020|Any CPU.ActiveCfg = R2020|Any CPU
27+
{C5E9459C-38FB-4F95-98BD-FFBB9B075D7A}.R2020|Any CPU.Build.0 = R2020|Any CPU
28+
{C5E9459C-38FB-4F95-98BD-FFBB9B075D7A}.R2021|Any CPU.ActiveCfg = R2021|Any CPU
29+
{C5E9459C-38FB-4F95-98BD-FFBB9B075D7A}.R2021|Any CPU.Build.0 = R2021|Any CPU
30+
{C5E9459C-38FB-4F95-98BD-FFBB9B075D7A}.R2022|Any CPU.ActiveCfg = R2022|Any CPU
31+
{C5E9459C-38FB-4F95-98BD-FFBB9B075D7A}.R2022|Any CPU.Build.0 = R2022|Any CPU
32+
{C5E9459C-38FB-4F95-98BD-FFBB9B075D7A}.R2023|Any CPU.ActiveCfg = R2023|Any CPU
33+
{C5E9459C-38FB-4F95-98BD-FFBB9B075D7A}.R2023|Any CPU.Build.0 = R2023|Any CPU
34+
{C5E9459C-38FB-4F95-98BD-FFBB9B075D7A}.R2024|Any CPU.ActiveCfg = R2024|Any CPU
35+
{C5E9459C-38FB-4F95-98BD-FFBB9B075D7A}.R2024|Any CPU.Build.0 = R2024|Any CPU
36+
{C5E9459C-38FB-4F95-98BD-FFBB9B075D7A}.R2025|Any CPU.ActiveCfg = R2025|Any CPU
37+
{C5E9459C-38FB-4F95-98BD-FFBB9B075D7A}.R2025|Any CPU.Build.0 = R2025|Any CPU
38+
{C5E9459C-38FB-4F95-98BD-FFBB9B075D7A}.R2026|Any CPU.ActiveCfg = R2026|Any CPU
39+
{C5E9459C-38FB-4F95-98BD-FFBB9B075D7A}.R2026|Any CPU.Build.0 = R2026|Any CPU
40+
{C5E9459C-38FB-4F95-98BD-FFBB9B075D7A}.R2027|Any CPU.ActiveCfg = R2027|Any CPU
41+
{C5E9459C-38FB-4F95-98BD-FFBB9B075D7A}.R2027|Any CPU.Build.0 = R2027|Any CPU
42+
{18101238-64C3-4441-9B9B-04590F5286DE}.R2020|Any CPU.ActiveCfg = R2020|Any CPU
43+
{18101238-64C3-4441-9B9B-04590F5286DE}.R2020|Any CPU.Build.0 = R2020|Any CPU
44+
{18101238-64C3-4441-9B9B-04590F5286DE}.R2021|Any CPU.ActiveCfg = R2021|Any CPU
45+
{18101238-64C3-4441-9B9B-04590F5286DE}.R2021|Any CPU.Build.0 = R2021|Any CPU
46+
{18101238-64C3-4441-9B9B-04590F5286DE}.R2022|Any CPU.ActiveCfg = R2022|Any CPU
47+
{18101238-64C3-4441-9B9B-04590F5286DE}.R2022|Any CPU.Build.0 = R2022|Any CPU
48+
{18101238-64C3-4441-9B9B-04590F5286DE}.R2023|Any CPU.ActiveCfg = R2023|Any CPU
49+
{18101238-64C3-4441-9B9B-04590F5286DE}.R2023|Any CPU.Build.0 = R2023|Any CPU
50+
{18101238-64C3-4441-9B9B-04590F5286DE}.R2024|Any CPU.ActiveCfg = R2024|Any CPU
51+
{18101238-64C3-4441-9B9B-04590F5286DE}.R2024|Any CPU.Build.0 = R2024|Any CPU
52+
{18101238-64C3-4441-9B9B-04590F5286DE}.R2025|Any CPU.ActiveCfg = R2025|Any CPU
53+
{18101238-64C3-4441-9B9B-04590F5286DE}.R2025|Any CPU.Build.0 = R2025|Any CPU
54+
{18101238-64C3-4441-9B9B-04590F5286DE}.R2026|Any CPU.ActiveCfg = R2026|Any CPU
55+
{18101238-64C3-4441-9B9B-04590F5286DE}.R2026|Any CPU.Build.0 = R2026|Any CPU
56+
{18101238-64C3-4441-9B9B-04590F5286DE}.R2027|Any CPU.ActiveCfg = R2027|Any CPU
57+
{18101238-64C3-4441-9B9B-04590F5286DE}.R2027|Any CPU.Build.0 = R2027|Any CPU
4858
EndGlobalSection
4959
GlobalSection(SolutionProperties) = preSolution
5060
HideSolutionNode = FALSE

Build.props

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,9 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project>
3-
<!-- Определение всех конфигураций Revit -->
43
<PropertyGroup>
5-
<Configurations>R2019;R2020;R2021;R2022;R2023;R2024;R2025;R2026;R2027</Configurations>
4+
<Configurations>R2020;R2021;R2022;R2023;R2024;R2025;R2026;R2027</Configurations>
65
<Platforms>AnyCPU</Platforms>
76
</PropertyGroup>
8-
<!-- Определение версии Revit и TargetFramework -->
9-
<PropertyGroup Condition="'$(Configuration)' == 'R2019'">
10-
<RevitVersion>2019</RevitVersion>
11-
<TargetFramework>net47</TargetFramework>
12-
</PropertyGroup>
137
<PropertyGroup Condition="'$(Configuration)' == 'R2020'">
148
<RevitVersion>2020</RevitVersion>
159
<TargetFramework>net47</TargetFramework>
@@ -43,13 +37,11 @@
4337
<TargetFramework>net8.0-windows</TargetFramework>
4438
</PropertyGroup>
4539

46-
<!-- OutputPath и DefineConstants -->
4740
<PropertyGroup Condition="'$(RevitVersion)' != ''">
4841
<OutputPath>bin\$(Configuration)\</OutputPath>
4942
<DefineConstants>DEBUG;$(Configuration);REVIT_$(RevitVersion)</DefineConstants>
5043
</PropertyGroup>
5144

52-
<!-- Общие свойства -->
5345
<PropertyGroup>
5446
<PlatformTarget>x64</PlatformTarget>
5547
<LangVersion>default</LangVersion>
@@ -65,14 +57,9 @@
6557
</PropertyGroup>
6658

6759
<ItemGroup>
68-
<PackageReference
69-
Condition="'$(Configuration)' == 'R$(RevitVersion)'"
70-
Include="Revit_All_Main_Versions_API_x64"
71-
Version="$(RevitVersion).*"
72-
IncludeAssets="build; compile"/>
60+
<PackageReference Condition="'$(Configuration)' == 'R$(RevitVersion)'" Include="Revit_All_Main_Versions_API_x64" Version="$(RevitVersion).*" IncludeAssets="build; compile"/>
7361
</ItemGroup>
7462

75-
<!-- Общие ссылки .NET -->
7663
<ItemGroup>
7764
<Reference Include="PresentationCore"/>
7865
<Reference Include="PresentationFramework"/>

source/Apibim.Revit.Extensions.csproj

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,9 @@
1515
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
1616
</PropertyGroup>
1717

18+
<ItemGroup>
19+
<PackageReference Include="System.Threading.Tasks.Extensions" Version="4.6.3"
20+
Condition="'$(TargetFramework)' != 'net8.0-windows'" />
21+
</ItemGroup>
22+
1823
</Project>

source/Extensions/AsyncTasksExecutor.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
using System.Threading.Tasks;
2+
13
namespace Apibim.Revit.Extensions;
24

35
/// <summary>

tests/Apibim.Revit.Extensions.Tests.csproj

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

33
<PropertyGroup>
4-
<TargetFramework>net8.0-windows</TargetFramework>
54
<IsPackable>false</IsPackable>
6-
<Nullable>enable</Nullable>
7-
<ImplicitUsings>enable</ImplicitUsings>
5+
</PropertyGroup>
6+
7+
<!-- FluentAssertions (net47 build) references System.Net.Http 4.2.0.0 while the
8+
.NET Framework 4.7 inbox assembly is 4.0.0.0; harmless at runtime since
9+
tests only execute under R2025/net8.0. -->
10+
<PropertyGroup Condition="'$(TargetFramework)' == 'net47' Or '$(TargetFramework)' == 'net48'">
11+
<NoWarn>$(NoWarn);MSB3277</NoWarn>
812
</PropertyGroup>
913

1014
<ItemGroup>

0 commit comments

Comments
 (0)