Unless I'm mistaken, it's not possible to get two different versions of the 
basic framework DLLs to be in memory on any machine at one time.  If the 1.1 
framework gets loaded to handle a COM+ component, there's no way to get any 
DLLs built against the 2.0 framework loaded unless they have manifests that 
permit them to work with 1.1.  Similarly, if the 2.0 framework gets loaded to 
handle a COM+ component, any 1.1 DLLs that get loaded will end up running 
against the 2.0 framework; IIRC the norm is for CLR 2.0 to load 1.1 DLLs on the 
presumption of backward compatibility, but you can again use a manifest so that 
instead of loading the 1.1 DLL under 2.0 the attempt to load will fail.

So I don't think you have any choice but to either use another machine (one for 
1.1 components and one for 2.0 components) or "affect all COM+ packages on the 
machine."

Good luck...

From: Charles Gamble
>Sent: 26 June 2007 16:12
>To: 'ADVANCED-DOTNET@DISCUSS.DEVELOP.COM'
>Subject: Per COM+ app .NET config files - not working
>
>
>
>Hi all,
>
>
>
>We have a .NET COM+ application that is written in .NET 1.1. However, we
>need to call out to .NET 2.0 DLLs from out .NET COM+ DLLs.
>
>If we create a dllhost.exe.config file as follows:
>
><?xml version="1.0" ?>
>
><configuration>
>
>      <startup>
>
>            <supportedRuntime version="v2.0.50727" />
>
>            <supportedRuntime version="v1.1.4322" />
>
>      </startup>
>
></configuration>
>
>
>
>and put into C:\windows\system32 folder this means we can run the .NET
>2.0 DLLs successfully.
>
>
>
>However, this is not a proper solution as it affects all COM+ packages
>on the machine. So we tried using the per COM+ app config files as
>mentioned in this article:
>
>http://blog.devstone.com/aaron/archive/2004/10/18/310.aspx
>
>
>
>We cannot get this to work (we are testing on a Windows 2003 machine),
>it still loads the .NET 1.1 framework, and all the calls to .NET DLLs
>fail stating that file is invalid (as it is a .NET 2.0 DLL).
>
>
>
>We created an application.config file containing the same text as the
>dllhost.exe.config mentioned above. We created an application.manifest
>file containing:
>
><?xml version="1.0" encoding="UTF-8" standalone="yes"?>
>
><assembly xmlns="urn:schemas-microsoft-com:asm.v1"
>manifestVersion="1.0"></assembly>
>
>
>
>Both files are saved as ANSI text files. They are saved to the root
>directory of our app, and the Application Root Directory is set to the
>same folder in the COM+ app properties.
>
>
>
>What could we be doing wrong?
>
>
>
>Thanks a lot,
>
>            Charles.


J. Merrill / Analytical Software Corp

===================================
This list is hosted by DevelopMentorĀ®  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com

Reply via email to