views:

223

answers:

2

I've written a .NET console app that wraps CuteFTP's Transfer Engine - a COM object (ftpte). The version I wrapped is CuteFTP 7.0. I'd like to also support the 8.0 version, as some of the clients I integrate with have that version.

I have a reference in my Visual Studio project to the CuteFTP COM object... how can I reference the version 8.0 component and still support version 7.0? It seems to me that I'm forced to choose at design time, unless I make a bigger architectural shift.

Ideas?

+2  A: 

Look at my hobby open source project MS Office Wrapper for .NET. There is used a "late-binding" which allows you to use a different version of COM libraries.

TcKs
+1  A: 

You need to reference the lowest version you need to support, and given that the new version do not change the API, but just add new functionality, you should be OK. But it clearly depends on application developers to not break the API.

That way, you will miss any new functionality added in the newer version, but at least old functionality should work.

Sunny
Sorry... I should have made this the answer long ago. Unfortunately the newer API did introduce a breaking change, but I established a plug-in model and put the versions in separately-wrapped libraries. Need v.7? Use this DLL. Ver 8.0, use this instead.
Mike L