Update PSReadLine build to target netstandard2.0#4584
Merged
daxian-dbw merged 2 commits intoPowerShell:masterfrom Feb 28, 2025
Merged
Update PSReadLine build to target netstandard2.0#4584daxian-dbw merged 2 commits intoPowerShell:masterfrom
netstandard2.0#4584daxian-dbw merged 2 commits intoPowerShell:masterfrom
Conversation
There was a problem hiding this comment.
PR Overview
This PR retargets the PSReadLine build to netstandard2.0 to simplify the build process and ensure consistent output across platforms. Key changes include:
- Updating the build and test commands in various configuration files (README.md, appveyor.yml, pipelines).
- Renaming the assembly from PSReadLine2.dll to PSReadLine.dll.
- Adjusting conditional logic in PSReadLine/OnImportAndRemove.cs to reference a netstandard target instead of net462.
Reviewed Changes
| File | Description |
|---|---|
| README.md | Updated installation, upgrading, and usage instructions. |
| PSReadLine/OnImportAndRemove.cs | Changed assembly resolution logic to target netstandard framework. |
| .github/CONTRIBUTING.md | Updated build instructions to refer to the README section. |
| appveyor.yml | Removed explicit net462 target for Release build; updated test targets. |
| .pipelines/PSReadLine-Official.yml | Updated build and signing steps to use the new assembly name and targets. |
Copilot reviewed 12 out of 12 changed files in this pull request and generated no comments.
Comments suppressed due to low confidence (1)
PSReadLine/OnImportAndRemove.cs:31
- [nitpick] The literal 'netstd' is ambiguous. Consider renaming it to 'netstandard2_0' or similar for clearer indication of the target framework.
string subd = (Environment.Version.Major >= 6) ? "net6plus" : "netstd";
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Summary
By retargeting PSReadLine to
netstandard2.0, we can simplify the build a lot and produce the same assembly no matter building on Windows or non-Windows.netstandard2.0, including the CI and release pipeline YAML files.net472andnet6.0, so that we can run tests with both .NET Framework and .NETMicrosoft.PowerShell.PSReadLine2.dlltoMicrosoft.PowerShell.PSReadLine.dllREADME.mdwith the up-to-date informationPR Checklist
Microsoft Reviewers: Open in CodeFlow