Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

bug: Could not load type 'System.Diagnostics.PerformanceCounter' #4295

Copy link
Copy link
@mi-hol

Description

@mi-hol
Issue body actions

Steps to reproduce

the script error.ps1 is attached.

  1. download WinSCP .Net assembly from https://winscp.net/download/WinSCP-5.9.6-Automation.zip
  2. unzip in a directory named C:\PS_B4)
    Note:
    in case a different directory name is choosen, script code below needs to be adapted before running it!
    $WinSCPnet_dll = ("C:\PS_B4\WinSCPnet.dll")
  3. copy attached script: error.ps1 inthe the same directory
  4. run powershell.exe
    .\error.ps1

Expected behavior

no error

and text:
script: ended successfully

Actual behavior

error gets

thrown:

Exception calling ".ctor" with "0" argument(s): "Could not load type 'System.Diagnostics.PerformanceCounter' from assembly 'System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'."

Environment data

> $PSVersionTable
Name                           Value
----                           -----
PSVersion                      6.0.0-beta
PSEdition                      Core
GitCommitId                    v6.0.0-beta.4
OS                             Microsoft Windows 10.0.14393
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0
Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue-Questionideally support can be provided via other mechanisms, but sometimes folks do open an issue to get aideally support can be provided via other mechanisms, but sometimes folks do open an issue to get aResolution-ExternalThe issue is caused by external component(s).The issue is caused by external component(s).

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.