This seems to be a common problem in PowerShell and Visual Studio, but the cases and solutions seem to be very different. Although I saw several similar questions, I have not yet found a working solution to my problem.
The problem occurs in the error message.
Failed to load file or assembly 'file: /// C: \ users \ jenstmar \ Desktop \ WinSCP.dll' One of its dependencies. The operation is not supported. (Exception from HRESULT: 0x80131515)
The file location is not valid because it is assumed that the .dll is in the same folder as the WinSCP installation. This place was changed to check if there were any rights or deficiencies that limited me to how to use it.
The line of script causing the problem is as follows:
# Load WinSCP .NET assembly [Reflection.Assembly]::LoadFrom("C:\users\jenstmar\Desktop\WinSCP.dll") | Out-Null
This error occurs in both PowerShell ISE and PS ISE (x86). I am running PowerShell V3.0 on a Windows Enterprise 64 environment as a local administrator. How can I fix this problem?
Mark jenster
source share