>Is it safe if I want to check mscoree.dll version to determine .NET runtime
>version?
Which runtime version? Keep in mind that you can have multiple
versions installed, but only one Mscoree.dll.
If you want the version of the currently loaded runtime from managed
code, the easiest way is to check System.Environment.Version.
Mattias

Signature
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.
Tester - 19 Jun 2004 00:49 GMT
Unless you do custom CLR hosting and specify version, isn't it safe to
assume that whatever mscoree.dll version is, that will be the version loaded
into process?
> >Is it safe if I want to check mscoree.dll version to determine .NET runtime
> >version?
[quoted text clipped - 6 lines]
>
> Mattias
Mattias Sj?gren - 20 Jun 2004 02:35 GMT
>Unless you do custom CLR hosting and specify version, isn't it safe to
>assume that whatever mscoree.dll version is, that will be the version loaded
>into process?
No. Since I have preview versions of v2.0 of the framework installed,
my Mscoree.dll is v2.0. But my applications compiled against v1.1
still runs under that version of the framework.
In addition, it was said at the PDC last year that Microsoft may in
the future have reasons to make available a small shim version of
Mscoree.dll that is redistributable without the framework. So the fact
that Mscoree.dll is available may not always mean that the framework
is installed at all.
Mattias

Signature
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.