Build Microsoft.PowerShell.CrossCompatibility for net8 like Engine and Rules
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 55/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- csharp, powershell
- 领域
- backend, build-system
调研方向
Start with Microsoft.PowerShell.CrossCompatibility.csproj and compare its target frameworks and references with the Engine project. Then check PSCompatibilityCollector.psm1, PSCompatibilityCollector/build.ps1, and Directory.Packages.props to trace where the framework and package are selected. Done means CrossCompatibility builds for net8 and net462, Rules no longer receives the extra PowerShellStandard.Library reference, and the collector uses the matching Core build.
由索引模型根据 Issue 内容生成。
描述
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.0becomesnet8,PowerShellStandard.LibrarybecomesSystem.Management.Automation.PSCompatibilityCollector.psm1andPSCompatibilityCollector/build.ps1:netstandard2.0becomesnet8.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
- 主要语言
- C#
- 星标
- 2.2k
- 派生
- 422
- 平均合并
- 2 小时 23 分钟
- 30 天内合并 PR
- 25
环境准备
在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
PowerShell/PSScriptAnalyzer 的其他 Issue
-
Up-for-Grabs
难度 1/5 1-3 小时 新手友好度 78/100
PowerShell/PSScriptAnalyzer#2213 · 2 条评论 ·
维护者通常 1 天内回复
-
难度 4/5 1-2 天 新手友好度 18/100
PowerShell/PSScriptAnalyzer#2302 ·
维护者通常 1 天内回复
-
Invoke-ScriptAnalyzer fails intermittently with NullReferenceException in CommandInfo.ResolveParameter (ProvideCommentHelp / AvoidReservedCharInCmdlet race on Export-ModuleMember)可能已有人在做 @jessehouwing 于 89 天前认领。 未关闭Issue - Bug
难度 4/5 3-5 天 新手友好度 52/100
PowerShell/PSScriptAnalyzer#2229 · 6 条评论 ·
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 32/100
PowerShell/PSScriptAnalyzer#2222 · 2 条评论 ·
维护者通常 1 天内回复
-
The new `docs\Rules\README.md` format causes merge issues可能已有人在做 @HuffmanStacks 于 8 天前认领。 未关闭
难度 3/5 1-2 天 新手友好度 48/100
PowerShell/PSScriptAnalyzer#2220 ·
维护者通常 1 天内回复
查看 PowerShell/PSScriptAnalyzer 的全部 Issue
相似的 Issue
-
area-templates triage:bot-seen triage:needs-human
难度 2/5 1-3 小时 新手友好度 75/100
microsoft/aspire#22356 · 1 条评论 ·
维护者通常 1 天内回复
-
Needs-Triage
难度 2/5 1-3 小时 新手友好度 84/100
PowerShell/PowerShell#28432 · 1 条评论 · 1 个 reaction ·
维护者通常 1 天内回复
-
documentation
难度 2/5 1-3 小时 新手友好度 78/100
microsoft/aspire.dev#2184 ·
维护者通常 2 天内回复
-
area-controls-refreshview platform/ios s/triaged
难度 2/5 1-3 小时 新手友好度 74/100
dotnet/maui#40314 · 1 个 reaction ·
维护者通常 1 天内回复
-
Needs: Triage (Functions) v5 v5-preview5
难度 2/5 1-3 小时 新手友好度 70/100
Azure/azure-functions-core-tools#5918 ·
维护者通常 1 天内回复