Post a reply

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

martin

Re: RegAsm : error RA0000 : Could not load file or assembly 'file:///c:\Program File s\winscp\WinSCPnet

gsuk wrote:

The above error and those discussed in this thread are resolved by right-clicking on the winscp dll and exe , then click Unblock under the general tab. The files are admin blocked when copied from another computer....apparently! :)

As documented:
https://winscp.net/eng/docs/message_net_operation_not_supported
gsuk

RegAsm : error RA0000 : Could not load file or assembly 'file:///c:\Program File s\winscp\WinSCPnet

RegAsm : error RA0000 : Could not load file or assembly 'file:///c:\Program File
s\winscp\WinSCPnet.dll' or one of its dependencies. Operation is not supported.
(Exception from HRESULT: 0x80131515)

The above error and those discussed in this thread are resolved by right-clicking on the winscp dll and exe , then click Unblock under the general tab. The files are admin blocked when copied from another computer....apparently! :)

See the notes in this article:

https://docs.microsoft.com/en-us/previous-versions/dotnet/netframework-4.0/dd409252(v=vs.100)
martin

bl4met wrote:

I was able to fix it with the RegAsm config hack.

What is "RegAsm config hack"?
ricpage

Habe you tried the full path structure

%WINDIR%\Microsoft.NET\Framework\v4.0.30319\RegAsm.exe "C:\Program Files (x86)\WinSCP\WinSCP.dll" /codebase /tlb
bl4met

I was gettig the same error yesterday, I was able to fix it with the RegAsm config hack.
2-buck

BUMP

I also tried logging in as admin instead of just using an admin command prompt. Still didn't work.
2-buck

RegAsm WinSCP.dll : Could not load file or assembly

What am I doing wrong? I'd like to automate WinSCP through a VBScript or Excel. I can't get the dll to register. I followed the instructions in https://winscp.net/eng/docs/library_install#registering

(1) I have windows 7.
(2) I have WinSCP 5.1.0 build 2625 installed and working fine.
(3) I downloaded winscp510automation.zip.
(4) I unzipped it to the same folder as the exe.
(5) I opened a command prompt with administrative privileges.
(6) I checked the windows directory and framework version.
(7) I ran it as you see below.

C:\Program Files\WinSCP>C:\Windows\Microsoft.NET\Framework\v4.0.30319\regasm.exe WinSCP.dll /codebase /tlb
Microsoft (R) .NET Framework Assembly Registration Utility 4.0.30319.1
Copyright (C) Microsoft Corporation 1998-2004. All rights reserved.

RegAsm : error RA0000 : Could not load file or assembly 'file:///C:\Program File
s\WinSCP\WinSCP.dll' or one of its dependencies. Operation is not supported. (Ex
ception from HRESULT: 0x80131515)