469,646 Members | 1,407 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,646 developers. It's quick & easy.

How does IJW determine version of CLR to load?

Hi,

We have some managed assemblies that are compiled with the /clr switch for
some native code to load. These are currently compiled and linked against a
pure .NET 1.0 environment.

I have both VS.NET 1.0 and 1.1 installed on my box. I noticed (in debugger)
that 1.1 system dll's are being loaded (specifically the 1.1. CLR). I would
have expected the IJW mechanism to inspect the managed assemblies it has to
load, and run the appropriate CLR.

How does this work and what options do we have in controlling the CLR
loading. For example, knowing what I have now observed, I cannot trust
"machine.config" files on user-deployed computer, because I don't know which
CLR version is being read.

Regards,

Leon
Nov 17 '05 #1
2 1515
"Leon Gorbaty [Bentley]" <le**********@bentley.com.RemoveRenameThis> wrote
in message news:up**************@TK2MSFTNGP10.phx.gbl...
I have both VS.NET 1.0 and 1.1 installed on my box. I noticed (in debugger) that 1.1 system dll's are being loaded (specifically the 1.1. CLR). I would have expected the IJW mechanism to inspect the managed assemblies it has to load, and run the appropriate CLR.

How does this work
I suspect someone will explain it to you shortly ... <g>
and what options do we have in controlling the CLR
loading. For example, knowing what I have now observed, I cannot trust
"machine.config" files on user-deployed computer, because I don't know which CLR version is being read.


If you decide that you want complete control of the load of common language
runtime you may want to check the docs for this function
CorBindToRuntimeEx() which allows you to load the version and type (server
or not) that you like. I _think_ that this is frowned on, but when you
gotta, you gotta. :-)

Regards,
Will


Nov 17 '05 #2
The version of the CLR used to run your appliaction is determined by the
version of mscoree.dll, this version corresponds to the version of the
newest .NET version, so if you have .NET 1.0 and 1.1 installed, mscoree.dll
is of version 1.1.
Applications built using the .NET Framework version 1.0 will automatically
use version 1.1 when installed , else it will use v1.0.
You can change this default behavior by using an application config file ,
but I don't see any reason to do this as the application will run properly
on version 1.1.

http://msdn.microsoft.com/library/de...orkversion.asp

has more information.

Willy.

"Leon Gorbaty [Bentley]" <le**********@bentley.com.RemoveRenameThis> wrote
in message news:up**************@TK2MSFTNGP10.phx.gbl...
Hi,

We have some managed assemblies that are compiled with the /clr switch for
some native code to load. These are currently compiled and linked against
a
pure .NET 1.0 environment.

I have both VS.NET 1.0 and 1.1 installed on my box. I noticed (in
debugger)
that 1.1 system dll's are being loaded (specifically the 1.1. CLR). I
would
have expected the IJW mechanism to inspect the managed assemblies it has
to
load, and run the appropriate CLR.

How does this work and what options do we have in controlling the CLR
loading. For example, knowing what I have now observed, I cannot trust
"machine.config" files on user-deployed computer, because I don't know
which
CLR version is being read.

Regards,

Leon

Nov 17 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Joe Kehnast | last post: by
31 posts views Thread by bilbothebagginsbab5 AT freenet DOT de | last post: by
reply views Thread by =?Utf-8?B?SmFtZXM=?= | last post: by
12 posts views Thread by =?Utf-8?B?Um9nZXIgTWFydGlu?= | last post: by
1 post views Thread by sva0008 | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.