Skip to content

Commit 1d611f0

Browse files
committed
build: collapse the no-DCV fork into a DcvSupport build flag
The 25.5.0 (no-DCV) and 26.x (DCV) targets differed only in the IAnyCAPlugin package version and whether SUPPORTS_DCV was defined. Maintaining that as a separate branch (feat/ianycaplugin-3.2-no-dcv) duplicated every fix. Replace it with a single MSBuild property: DcvSupport=true (default) -> IAnyCAPlugin 3.3.0-PRERELEASE + SUPPORTS_DCV (26.x) -p:DcvSupport=false -> IAnyCAPlugin 3.2.0, DCV fenced via #if (25.5.0) One property drives the package version, the compile constant, and DCV test-file inclusion across all three projects. Verified both ways: default: IAnyCAPlugin 3.3.0, 195 unit tests pass (DCV tests in) -p:DcvSupport=false: IAnyCAPlugin 3.2.0, 172 unit tests pass (DCV tests out) both 0 warnings. The no-DCV branch is now redundant. See issue 0003.
1 parent 8f17d2b commit 1d611f0

3 files changed

Lines changed: 23 additions & 9 deletions

File tree

CERTInext.IntegrationTests/CERTInext.IntegrationTests.csproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@
66
<LangVersion>12.0</LangVersion>
77
<IsPackable>false</IsPackable>
88
<IsTestProject>true</IsTestProject>
9+
<!-- Mirror the main project's DcvSupport flag so DCV test files compile in (and SUPPORTS_DCV
10+
is defined) on the default DCV build, and are excluded with -p:DcvSupport=false. -->
11+
<DcvSupport Condition="'$(DcvSupport)' == ''">true</DcvSupport>
12+
<DefineConstants Condition="'$(DcvSupport)' == 'true'">$(DefineConstants);SUPPORTS_DCV</DefineConstants>
913
</PropertyGroup>
1014

1115
<ItemGroup>

CERTInext.Tests/CERTInext.Tests.csproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@
66
<LangVersion>12.0</LangVersion>
77
<IsPackable>false</IsPackable>
88
<IsTestProject>true</IsTestProject>
9+
<!-- Mirror the main project's DcvSupport flag so DCV test files compile in (and SUPPORTS_DCV
10+
is defined) on the default DCV build, and are excluded with -p:DcvSupport=false. -->
11+
<DcvSupport Condition="'$(DcvSupport)' == ''">true</DcvSupport>
12+
<DefineConstants Condition="'$(DcvSupport)' == 'true'">$(DefineConstants);SUPPORTS_DCV</DefineConstants>
913
</PropertyGroup>
1014

1115
<ItemGroup>

CERTInext/CERTInext.csproj

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,25 @@
66
<ImplicitUsings>disable</ImplicitUsings>
77
<Nullable>warnings</Nullable>
88
<LangVersion>12.0</LangVersion>
9-
<!-- DCV requires the v3.3-only IDomainValidatorFactory. This branch targets
10-
IAnyCAPlugin 3.2.0 (for 25.5.0 hosts), so SUPPORTS_DCV is intentionally NOT
11-
defined and all DCV code is fenced out with #if SUPPORTS_DCV. See issue 0003. -->
12-
<!-- <DefineConstants>SUPPORTS_DCV</DefineConstants> -->
9+
<!-- DcvSupport toggles DCV (DNS-01 domain validation) across the entire build. Default
10+
true → IAnyCAPlugin 3.3.0-PRERELEASE + the SUPPORTS_DCV compile constant (26.x hosts).
11+
Build with -p:DcvSupport=false for the IAnyCAPlugin 3.2.0 / no-DCV variant required by
12+
25.5.0 hosts — DCV code is then fenced out with #if SUPPORTS_DCV. This one property
13+
drives the package version, the compile constant, and DCV test-file inclusion, so the
14+
two host targets are a build flag rather than a maintained fork. See issue 0003. -->
15+
<DcvSupport Condition="'$(DcvSupport)' == ''">true</DcvSupport>
16+
<DefineConstants Condition="'$(DcvSupport)' == 'true'">$(DefineConstants);SUPPORTS_DCV</DefineConstants>
1317
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
1418
</PropertyGroup>
1519

1620
<ItemGroup>
17-
<!-- 3.2.0 (NOT 3.3) so the plugin's AnyCAPluginCertificate contract matches gateway
18-
hosts shipping IAnyCAPlugin 3.2.0 (e.g. anygateway-rest 25.5.0). DCV requires the
19-
3.3-only IDomainValidatorFactory, so the DCV code is disabled on this branch.
20-
See issue 0003. -->
21-
<PackageReference Include="Keyfactor.AnyGateway.IAnyCAPlugin" Version="3.2.0" />
21+
<!-- IAnyCAPlugin version follows DcvSupport so the plugin's AnyCAPluginCertificate contract
22+
matches the gateway host: 3.3.0-PRERELEASE (DCV / 26.x hosts) by default, or 3.2.0
23+
(no-DCV / 25.5.0 hosts, e.g. anygateway-rest 25.5.0) with -p:DcvSupport=false. The
24+
3.3-only IDomainValidatorFactory is only referenced from #if SUPPORTS_DCV code, so the
25+
3.2.0 build compiles cleanly. See issue 0003. -->
26+
<PackageReference Include="Keyfactor.AnyGateway.IAnyCAPlugin" Version="3.3.0-PRERELEASE-78770-979f582005" Condition="'$(DcvSupport)' == 'true'" />
27+
<PackageReference Include="Keyfactor.AnyGateway.IAnyCAPlugin" Version="3.2.0" Condition="'$(DcvSupport)' != 'true'" />
2228
<PackageReference Include="Keyfactor.Logging" Version="1.1.2" />
2329
<PackageReference Include="Keyfactor.PKI" Version="5.5.0" />
2430
<PackageReference Include="RestSharp" Version="112.1.0" />

0 commit comments

Comments
 (0)