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

martin
Site Admin
martin avatar
Joined:
Posts:
27,253
Location:
Prague, Czechia

bl4met wrote:

I was able to fix it with the RegAsm config hack.
What is "RegAsm config hack"?
_________________
Martin Prikryl

Reply with quote

Advertisement

You can post new topics in this forum