◐ Shell
clean mode source ↗

Remove conditional compilation for PSv6 and therefore netstandard2.0 for Engine and Rules projects by bergmeister · Pull Request #1600 · PowerShell/PSScriptAnalyzer

Conversation

@bergmeister

PR Summary

This is due to PS 6.2 having reached EOL. The Engine and Rules projects target netcoreapp3.1 for PS 7, therefore the netstandard2.0 compilation target for them is not needed any more. Because the CrossCompatility project is still generic and is not targeting netcoreapp3.1 for PS 7, we can and should keep that project using netstandard2.0.
This will make the module smaller in size and the build faster as a nice side-effect.

PR Checklist

…for Engine/Rules project

bergmeister

$binaryModuleRoot = Join-Path -Path $PSModuleRoot -ChildPath "PSv$($PSVersionTable.PSVersion.Major)"
}
elseif ($PSVersionTable.PSVersion.Major -eq 6 ) {
[Version] $minimumPowerShellCoreVersion = '7.0.3'

Choose a reason for hiding this comment

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

I chose to bump not just from 6.2.4 to 7.0.0 but also to 7.0.3 in anticipation of PR #1597 getting merged, which will bump the minimum version to 7.0.3. Since 7.0.2 is not supported anyway because 7.0.3 is already more than a month old, this should not be an issue.

JamesWTruher

rjmholt

rjmholt

<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp3.1' ">
<PackageReference Include="System.Reflection.TypeExtensions" Version="4.7.0" />
<PackageReference Include="Microsoft.Management.Infrastructure" Version="2.0.0" />
<Compile Remove="UseSingularNouns.cs" />

Choose a reason for hiding this comment

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

I put this in the same block since the previous PR did the same, but I'd be happy to move it to its own block too

Labels