Hacktoberfest 2026:維護者為十月標記出來的 issue,仍然開放、適合新手。 瀏覽 Hacktoberfest issue

PSResourceGet 1.3.0-preview2 error when installing AZ Module

未關閉
#2,061 1 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

維護者通常 1 天內回覆

還沒有人認領這個 Issue。

評估

難度
3/5
預估耗時
1-2 天
新手友好度
55/100
Issue 類型
缺陷
描述清晰度
基本清楚
活躍度
活躍
技術堆疊
csharp, powershell
領域
cli, tooling

研究方向

Start by reproducing the reported failure with Install-PSResource -Name AZ -Scope CurrentUser -Repository PSGallery on PSResourceGet 1.3.0-preview2, then compare with 1.2.0 as the issue reports. Trace the Install-PSResource failure path; the issue does not identify a source file or test. Done means the AZ module installs without error in the reported environments.

由索引模型根據 Issue 內容生成。

描述

Needs-Triage
Prerequisites
  • Write a descriptive title.
  • Make sure you are able to repro it on the latest released version
  • Search the existing issues.
Steps to reproduce

When using the Microsoft.PowerShell.PSResourceGet 1.3.0-preview2 i've got an error when installing the AZ 16.4.0 PowerShell Module in PowerShell 5.1 and 7.6.6

Install-PSResource -Name AZ -Scope CurrentUser -Repository PSGallery

Image Image

Works fine in Microsoft.PowerShell.PSResourceGet 1.2.0

Expected behavior
Install-PSResource without error
Actual behavior
`Install-PSResource -Name AZ -Scope CurrentUser -Repository PSGallery` throws an error
Error details
get-error

Exception             :
    Type    : Microsoft.PowerShell.PSResourceGet.UtilClasses.ResourceNotFoundException
    Message : Package(s) 'AZ' could not be installed from repository 'PSGallery'.
    HResult : -2146233088
TargetObject          : Microsoft.PowerShell.PSResourceGet.Cmdlets.InstallPSResource
CategoryInfo          : InvalidData: (Microsoft.PowerShel…s.InstallPSResource:InstallPSResource) [Install-PSResource],
ResourceNotFoundException
FullyQualifiedErrorId : InstallPackageFailure,Microsoft.PowerShell.PSResourceGet.Cmdlets.InstallPSResource
InvocationInfo        :
    MyCommand        : Install-PSResource
    ScriptLineNumber : 1
    OffsetInLine     : 1
    HistoryId        : 3
    Line             : Install-PSResource -Name AZ -Scope CurrentUser -Repository PSGallery
    Statement        : Install-PSResource -Name AZ -Scope CurrentUser -Repository PSGallery
    PositionMessage  : At line:1 char:1
                       + Install-PSResource -Name AZ -Scope CurrentUser -Repository PSGallery
                       + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    InvocationName   : Install-PSResource
    CommandOrigin    : Internal
ScriptStackTrace      : at <ScriptBlock>, <No file>: line 1
PipelineIterationInfo :
      0
      1
Environment data
Get-InstalledPSResource -name Microsoft.PowerShell.PSResourceGet -Scope CurrentUser

Name                               Version Prerelease Repository Description
----                               ------- ---------- ---------- -----------
Microsoft.PowerShell.PSResourceGet 1.3.0   preview2   PSGallery  PowerShell module with commands for discovering, inst…

PS C:\> $PSVersionTable

Name                           Value
----                           -----
PSVersion                      7.6.6
PSEdition                      Core
GitCommitId                    7.6.6
OS                             Microsoft Windows 10.0.26300
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.4
SerializationVersion           1.1.0.1
WSManStackVersion              3.0
Visuals

No response

主要語言
C#
星號
577
分支
114
平均合併
14 小時 27 分鐘
30 天內合併 PR
7

環境準備

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

PowerShell/PSResourceGet 的其他 Issue

查看 PowerShell/PSResourceGet 的全部 Issue

相似的 Issue

更多 C# Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。