Add-Type : Could not load file or assembly [Resolved]
Hi folks,
I have been trying for and looking through the forum threads for a solution but I keep getting the same issue.
I am trying to get
but I get:
Specifications:
Windows 10
WinSCP-5.17.5
.NET Framework 4.7.3056
PowerShell version 5.1.17134.858
I have been trying for and looking through the forum threads for a solution but I keep getting the same issue.
I am trying to get
Add-Type
in PowerShell to work:
Add-Type -Path "C:\Program Files (x86)\WinSCP\WinSCPnet.dll"
but I get:
I unblocked the dll but I am still getting the same issue. I tried this also:Add-Type : Could not load file or assembly 'file:///C:\Program Files (x86)\WinSCP\WinSCPnet.dll' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)
$assemblyPath = if ($env:WINSCP_PATH) { $env:WINSCP_PATH } else { $PSScriptRoot } Add-Type -Path (Join-Path $assemblyPath "WinSCPnet.dll")
Specifications:
Windows 10
WinSCP-5.17.5
.NET Framework 4.7.3056
PowerShell version 5.1.17134.858
Last edited by ibqadamani on 2020-05-05 16:34; edited 1 time in total