.NET Framework Version Conflict


Markus Strobl


I always supposed when i compile .NET assemblies using VS.NET 2003 they will
definitely use .NET Framework 1.1 and .NET assemblies compiled with VS.NET
2005 will use .NET Framework 2.0.
(I except tricking around using .config-files).

Now we ran into situations where .net framework versions seem to interfere
each other.

We're using COM-callable wrappers for integrating .NET technology into our
old Win32-Applications.

As those CCW where compiled using VS.NET 2003 they always where using .NET
Framework 1.1 as supposed.

Then i installed VS.NET 2005 with .NET Framework 2.0 on my development
machine and suddenly i noticed that System.Environment.Version.ToString()
returns 2.0.50727.42.

A i'm a suspicious person i used Process Explorer to see whats really used
and voila: only 2.0 assemblies are used although the component hasn't

Then i tried to use the component from a .net 1.1 application in .net style
without the COM-callable wrapper and the result was that
System.Environment.Version.ToString() returned 1.1.4322.2032 again, a lot of
1.1 assemblies were used but still it uses aspnet_perf.dll from the 2.0
Framework for some reason?! Additionally C/C++ Runtime 8.0 is loaded into
this process.

Could anybody shed some light on this confusing behavior?

I'm using Windows XP SP2 btw.

Thanks a lot in advance

Best Wishes




Steven Cheng[MSFT]

Thanks for Mattias's input.

Hi Markus,

For umanaged application which host .NET component, it by default load the
latest version of the .net framework installed on the machine. If we need
to explicitly specify the .net framework version the unmanaged application
will load, we can provide an applicationname.exe.config file for it (just
like for managed application). See the following msdn article which
mentioned different kinds of .net framework application side by side

#Side-by-Side Execution of the .NET Framework-----Configuring Unmanaged

Hope this helps.


Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no

Markus Strobl

Thanks a lot for your help, guys!!!

This will prevent us from eventually running into serious problems when
deploying .net runtime 2.0.

Best Wishes



Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question