Skip to content

Exception when attempting PackageManagement upgrade #1721

Closed
@mavaddat

Description

@mavaddat

The issue is that PowerShell produces an exception System.ComponentModel.Win32Exception,Microsoft.PowerShell.Commands.RemoveItemCommand,Microsoft.PowerShell.Package Management.Cmdlets.InstallPackage when running the update package manager upon being prompted by the PowerShell VS Code extension (v2021.12.0).

  • PowerShell suggests upgrading PackageManager due to a security vulnerability:

You have an older version of PackageManagement known to cause issues with the PowerShell extension. Would you like to update PackageManagement (You will need to restart the PowerShell extension after)?

  • I accept this recommendation.
  • PowerShell produces the following error:
PackageManagement\Install-Package : Access to the cloud file is denied                                                                           At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\1.0.0.1\PSModule.psm1:1809 char:21                                                   
+ ...          $null = PackageManagement\Install-Package @PSBoundParameters
+                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (Microsoft.Power....InstallPackage:InstallPackage) [Install-Package], Exception
    + FullyQualifiedErrorId : System.ComponentModel.Win32Exception,Microsoft.PowerShell.Commands.RemoveItemCommand,Microsoft.PowerShell.Package 
   Management.Cmdlets.InstallPackage

image

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions