Remove conditional compilation for PSv6 and therefore netstandard2.0 for Engine and Rules projects by bergmeister · Pull Request #1600 · PowerShell/PSScriptAnalyzer
Conversation
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
- PR has a meaningful title
- Use the present tense and imperative mood when describing your changes
- Summarized changes
- Change is not breaking
- Make sure all
.cs,.ps1and.psm1files have the correct copyright header - Make sure you've added a new test if existing tests do not effectively test the code changed and/or updated documentation
- This PR is ready to merge and is not Work in Progress.
- If the PR is work in progress, please add the prefix
WIP:to the beginning of the title and remove the prefix when the PR is ready.
- If the PR is work in progress, please add the prefix
…for Engine/Rules project
| $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.
| <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