GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Build Microsoft.PowerShell.CrossCompatibility for net8 like Engine and Rules · Issue #2300 · PowerShell/PSScriptAnalyzer

Build Microsoft.PowerShell.CrossCompatibility for net8 like Engine and Rules #2300

New issue
Copy link
New issue
Copy link
Open
Open
Build Microsoft.PowerShell.CrossCompatibility for net8 like Engine and Rules#2300
Copy link

Description

@ChrisTX
Christian Pfeiffer (ChrisTX)
opened on Nov 4, 2026
Issue body actions

Summary of the new feature

Since #2073, Engine and Rules target net8;net462 and compile against System.Management.Automation 7.4. Microsoft.PowerShell.CrossCompatibility, which Rules references, still targets netstandard2.0;net462 and compiles against PowerShellStandard.Library 5.1.1 for the Core build.

This has two effects:

  • PowerShellStandard.Library flows from CrossCompatibility into Rules, next to System.Management.Automation 7.4, so Rules gets two reference assemblies for System.Management.Automation. It only works because the SDK's conflict resolution picks the higher assembly version.
  • Building PSScriptAnalyzer needs PowerShellStandard.Library just for this one project.

The netstandard2.0 build lets PSCompatibilityCollector load on any PowerShell 6 or newer. Every supported PowerShell 7 is 7.4 or newer, which runs a net8 build, and the shipped profiles were last collected for PowerShell 7.0 (#1429).

Proposed technical implementation details (optional)

Target net8;net462 in CrossCompatibility, with System.Management.Automation for net8 like Engine:

  • Microsoft.PowerShell.CrossCompatibility.csproj: netstandard2.0 becomes net8, PowerShellStandard.Library becomes System.Management.Automation.
  • PSCompatibilityCollector.psm1 and PSCompatibilityCollector/build.ps1: netstandard2.0 becomes net8.
  • Directory.Packages.props: drop PowerShellStandard.Library.

The collector would then need PowerShell 7.4 or newer on Core. Windows PowerShell keeps the net462 build.

If you'd rather keep netstandard2.0, PrivateAssets="all" on the PowerShellStandard.Library reference would at least keep it from flowing into Rules, as it's only needed for compiling.

I can open a PR for either.

What is the latest version of PSScriptAnalyzer at the point of writing

1.25.0

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.