Skip to content

Conversation

@APErebus
Copy link
Contributor

@APErebus APErebus commented Jan 14, 2026

Now that every project is .NET 8 and there is no .NET Framework, we can remove any pre-processor #if statements and extra defined constants.

ref MD-1413

</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.DotNet.Analyzers.Compatibility" Version="0.2.12-alpha">
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we don't need this as there is no cross-framework compatibility to worry about anymore

<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<DefineConstants>$(DefineConstants);DEBUG</DefineConstants>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DEBUG is an implicitly defined constant for this configuration

using (var basisFile = new TemporaryFile(PackageBuilder.BuildSamplePackage("Acme.Web", "1.0.0")))
using (var signatureFile = new TemporaryFile(basisFile.FilePath + ".octosig"))
{
#if USE_OCTODIFF_EXE
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What dictates USE_OCTODIFF_EXE?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was a pre-processor constant for .NET 4.6.2... Example in 2025.4

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It maybe have been removed in #1669

@APErebus APErebus requested a review from Jtango18 January 14, 2026 22:24
static SubstitutionsFixture()
{
#if NETCORE
Encoding.RegisterProvider(CodePagesEncodingProvider.Instance); // Required to use code pages in .NET Standard
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Kill the comment - it's superfluous

Copy link
Contributor

@Jtango18 Jtango18 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some minor nit-needles in the haystack, otherwise...looks dope! SHIP IT!

@APErebus APErebus enabled auto-merge (squash) January 15, 2026 00:59
@APErebus APErebus merged commit df15339 into main Jan 15, 2026
34 checks passed
@APErebus APErebus deleted the ap/remove-all-preprocessors branch January 15, 2026 01:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants