It seems to work after a computer restart.
- ibqadamani
Add-Type
in PowerShell to work:
Add-Type -Path "C:\Program Files (x86)\WinSCP\WinSCPnet.dll"
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")