Topic "Using with VB6 COM when Only 4.0 framework installed"

Author Message
[View user's profile]

Joined: 2015-07-02
Posts: 2
Location: USA

I've got the library working great from VB6, however the library is requiring the 2.0 framework. I understand it was built against the 2.0 framework, but the installation instructions seem to suggest it will work on the 4.0 framework as well. No go. I even tried making a WinSCPnet.config file such as the following:

<?xml version ="1.0"?>
<startup useLegacyV2RuntimeActivationPolicy="true">
<supportedRuntime version="v4.0" />
<supportedRuntime version="v2.0.50727" />
<generatePublisherEvidence enabled="false"/>

[The runtime section at the end is to solve another problem - that the 2.0 framework automatically phones an OCSP server to check the digital certificate revocation status when the library is loaded - which unacceptably flags my app in third-party firewalls as sending data]

If I register it using the 4.0 RegAsm.exe, it still requires the 2.0 framework to be installed. I've spent hours and hours on this. How can I get the library to run if EITHER the 2.0 OR the 4.0 framework is installed?

This is important since the 2.0 framework is NOT installed by default on Win8/8.1/10 but 4.0 is.
[View user's profile]

Joined: 2015-07-02
Posts: 2
Location: USA
Well, I managed to get it to work but boy is this silly. Basically I needed to add the .config file mentioned above for my VB6 app (not the DLL). I had actually already tried this, but previously messed up and created it as myapp.config instead of myapp.exe.config. By creating the latter, I solved this and it does now seem to run regardless of framework version installed. I know config files aren't so unusual in the .NET world, but for my VB6 app, it seems rather silly that I've got to install this .net related config file for MY APP just so that the library that my app happens to use for one of its many functions can work on either 2.0 or 4.0 CLR.

You can post new topics in this forum

Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!


About donations

$9   $19   $49   $99

About donations


WinSCP Privacy Policy

WinSCP License