RegAsm WinSCP.dll : Could not load file or assembly

Advertisement

2-buck
Joined:
Posts:
2

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)

Reply with quote

Advertisement

ricpage
Joined:
Posts:
1
Location:
UK

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

Reply with quote

Advertisement

gsuk
Guest

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://learn.microsoft.com/en-us/previous-versions/dotnet/netframework-4.0/dd409252(v=vs.100)

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
40,476
Location:
Prague, Czechia

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

Reply with quote

Advertisement

You can post new topics in this forum