![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | programmatic assembly redirection (late binding?) Hi, I have to versions of an assembly as a reference, let's say version 1 and version 2. Both of them write a certain file format v1 and v2, but none of them is able to write both formats. A requirement for my application is to have the user choose, which file format he wants to write. Therefor I want to find a way to dynamically choose which version of the assembly to load. I am familiar with assembly redirection through config files, but this is a static method where you'd have to decide before starting the app, on which version to load. Any hints on this one? -- Dipl.-Ing. Ralf Steinstraesser Software Architekt Bissantz & Company GmbH |
My System Specs![]() |
| | #2 (permalink) |
| | Re: programmatic assembly redirection (late binding?) Why not Assembly.Load()??? This sounds like a plug-in type of app. Your file handling assemblies can offer a standard interface and methods, a contract, and also some mechanism to associate file format v1 with assembly 1. Then you'd map from v1 to the assembly, load the assembly, reflect to find the interface and call the appropriate methods. Assuming they're your assemblies of course. -- Phil Wilson The Definitive Guide to Windows Installer http://www.apress.com/book/view/1590592972 "Ralf Steinstraesser" <RalfSteinstraesser@newsgroup> wrote in message news:ADF394F8-B0FC-4BAB-9589-C9F34CCDAE7B@newsgroup Quote: > Hi, > > I have to versions of an assembly as a reference, let's say version 1 and > version 2. Both of them write a certain file format v1 and v2, but none of > them is able to write both formats. A requirement for my application is to > have the user choose, which file format he wants to write. Therefor I want > to > find a way to dynamically choose which version of the assembly to load. I > am > familiar with assembly redirection through config files, but this is a > static > method where you'd have to decide before starting the app, on which > version > to load. > > Any hints on this one? > > -- > Dipl.-Ing. Ralf Steinstraesser > Software Architekt > Bissantz & Company GmbH > |
My System Specs![]() |
| | #3 (permalink) |
| | Re: programmatic assembly redirection (late binding?) Ralf Steinstraesser wrote: Quote: > Hi, > > I have to versions of an assembly as a reference, let's say version 1 and > version 2. Both of them write a certain file format v1 and v2, but none of > them is able to write both formats. A requirement for my application is to > have the user choose, which file format he wants to write. Therefor I want to > find a way to dynamically choose which version of the assembly to load. I am > familiar with assembly redirection through config files, but this is a static > method where you'd have to decide before starting the app, on which version > to load. > > Any hints on this one? > which dll to use? Could there possibly be a way to inspect the files to determine their version? As Phil said, Assembly.Load seems the way to go. -- Mike |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| Option Strict Disallows Late Binding | .NET General | |||
| Late Binding with IDispatch based com objects | PowerShell | |||
| RC2 and late-binding / loose types | PowerShell | |||
| Powershell interacting with COM automation with late-binding? | PowerShell | |||