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 天內回覆