R
Richard
I have a service which is used to call differenct versions
of an application depending on the database version that
is being used.
The service has been compiled in framework 1.1 and it
needs to call the current version of the application (also
compiled in framework 1.1) and also historic versions
(compiled in framework 1.0).
The application compiled in framework 1.1 loads correctly,
however, when it attempts to load the assemblies compiled
in framework 1.0 I get an InvalidCastException when
calling the unwrap method. Example code is shown below:
ObjectHandle obj = System.Activator.CreateInstance
(fullAssemblyName, pc.Type);
IInstance m_instance = (IInstance)obj.Unwrap();
The DLL highlighted by the thrown exception is stored in
the GAC. And a different assembly version applies to each
instance. I have a application config file but it doesn't
appear to have had an effect.
Any Ideas?
of an application depending on the database version that
is being used.
The service has been compiled in framework 1.1 and it
needs to call the current version of the application (also
compiled in framework 1.1) and also historic versions
(compiled in framework 1.0).
The application compiled in framework 1.1 loads correctly,
however, when it attempts to load the assemblies compiled
in framework 1.0 I get an InvalidCastException when
calling the unwrap method. Example code is shown below:
ObjectHandle obj = System.Activator.CreateInstance
(fullAssemblyName, pc.Type);
IInstance m_instance = (IInstance)obj.Unwrap();
The DLL highlighted by the thrown exception is stored in
the GAC. And a different assembly version applies to each
instance. I have a application config file but it doesn't
appear to have had an effect.
Any Ideas?