<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Enumerating CLR versions</title><link>http://blogs.msdn.com/junfeng/archive/2005/07/07/436755.aspx</link><description>The following is a sample from the developer who owns mscoree.dll. The sample prints out all the CLR versions installed in the machine. The code will be shipped in .Net framework SDK as a sample. // This is the function pointer definition for the shim</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>re: Enumerating CLR versions</title><link>http://blogs.msdn.com/junfeng/archive/2005/07/07/436755.aspx#437011</link><pubDate>Sat, 09 Jul 2005 02:51:31 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:437011</guid><dc:creator>John Hensley</dc:creator><description>Great post! Thanks for making this very useful information available. The #defines for RUNTIME_INFO_UPGRADE_VERSION, RUNTIME_INFO_UPGRADE_VERSION and RUNTIME_INFO_DONT_SHOW_ERROR_DIALOG that are passed as the runtimeInfoFlags parameter don't seem to be defined in any of the headers in DevStudio 2003, DevStudio 2005 Beta 2 or current SDKs.</description></item><item><title>re: Enumerating CLR versions</title><link>http://blogs.msdn.com/junfeng/archive/2005/07/07/436755.aspx#437106</link><pubDate>Sat, 09 Jul 2005 13:36:15 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:437106</guid><dc:creator>Ian Thomas</dc:creator><description>Yeh, the first thing the owner of this code should do is to make it well known to the Windows Installer guys, and to the VS2003 / VS2005 teams, so there's a Custom Action DLL built for the MSIExec, and/or incorporated into the non-dotNET bootstrapper.&lt;br&gt;&lt;br&gt;The REAL WORLD largely doesn't have ANY version of the CLR installed, or possibly has .NET v1.1; worse, we find that clients have &amp;quot;experimental&amp;quot; installs of this or that beta or CTP, and it's hell's business to sort it out and make something written for v1.1 install and work smoothly. &lt;br&gt;&lt;br&gt;I don't know if you recall Microsoft's systematically orchestrated chaos that was MDAC data connectivity versioning, but I'd hate to think that you guys think that by providing a little bit of C++ code the transitioning problems for developers and users, for systems going from Win32 to some version of .NET, will be a piece of cake. &lt;br&gt;&lt;br&gt;Life's tough out here!!  </description></item><item><title>re: Enumerating CLR versions</title><link>http://blogs.msdn.com/junfeng/archive/2005/07/07/436755.aspx#437123</link><pubDate>Sat, 09 Jul 2005 16:02:55 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:437123</guid><dc:creator>Andrei Ignat</dc:creator><description>Great information.&lt;br&gt;How about an API in next versions of .NET about those version ( reflection, any other code)? Why MUST all this code be written in C++ and not in C# ? ( or any other .NET language )?</description></item><item><title>Interesting Finds</title><link>http://blogs.msdn.com/junfeng/archive/2005/07/07/436755.aspx#437241</link><pubDate>Sun, 10 Jul 2005 16:24:49 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:437241</guid><dc:creator>Jason Haley</dc:creator><description /></item><item><title>Interesting Finds</title><link>http://blogs.msdn.com/junfeng/archive/2005/07/07/436755.aspx#437495</link><pubDate>Mon, 11 Jul 2005 12:58:16 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:437495</guid><dc:creator>Jason Haley</dc:creator><description /></item><item><title>re: Enumerating CLR versions</title><link>http://blogs.msdn.com/junfeng/archive/2005/07/07/436755.aspx#437503</link><pubDate>Mon, 11 Jul 2005 15:05:20 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:437503</guid><dc:creator>Andy</dc:creator><description>John - I just did a search for RUNTIME_INFO_UPGRADE_VERSION in my Visual Studio 2005 Beta 2 folder, and I found it in SDK\v2.0\include\mscoree.h. Maybe you should look in the .NET SDK folder instead of the Platform SDK folder?&lt;br&gt;&lt;br&gt;Andrei - personally, I find these functions much more useful in the unmanaged C++ case than in the C# case. If you're in C# already, then the CLR is already loaded and you can't really do anything about that. From C++, you can make an intelligent decision based on the versions that are installed. I have to do just that, although I'm not sure if I want to rely on the above code though since I'll need to do the same sort of thing even if .NET v2.0 isn't installed, which doesn't have this ability.&lt;br&gt;&lt;br&gt;You can get the current version of the CLR that is running from C#, just call System.Runtime.InteropServices.RuntimeEnvironment.GetSystemVersion(). If Microsoft is going to expose the above functionality from within .NET, it would probably be in the RuntimeEnvironment class, which appears to be a wrapper for the unmanaged API exposed by mscoree.dll.</description></item><item><title>re: Enumerating CLR versions</title><link>http://blogs.msdn.com/junfeng/archive/2005/07/07/436755.aspx#439938</link><pubDate>Mon, 18 Jul 2005 16:57:37 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:439938</guid><dc:creator>Anonymous</dc:creator><description>How about also expanding this code to include displaying information on service packs and hotfixes. The lack of a &amp;quot;CLR status utility&amp;quot; is disappointing and we had to write our own using variations of the above code.&lt;br&gt;</description></item><item><title>Sample code to enumerate .NET Framework versions</title><link>http://blogs.msdn.com/junfeng/archive/2005/07/07/436755.aspx#445448</link><pubDate>Sat, 30 Jul 2005 19:44:24 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:445448</guid><dc:creator>Aaron Stebner's WebLog</dc:creator><description>I found an interesting post that lists some sample code to enumerate the installed versions of the .NET...</description></item><item><title>Determining Framework Version | keyongtech</title><link>http://blogs.msdn.com/junfeng/archive/2005/07/07/436755.aspx#9363368</link><pubDate>Thu, 22 Jan 2009 08:46:51 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9363368</guid><dc:creator>Determining Framework Version | keyongtech</dc:creator><description>&lt;p&gt;PingBack from &lt;a rel="nofollow" target="_new" href="http://www.keyongtech.com/426224-determining-framework-version"&gt;http://www.keyongtech.com/426224-determining-framework-version&lt;/a&gt;&lt;/p&gt;
</description></item><item><title>Updated sample .NET Framework detection code that does more in-depth checking</title><link>http://blogs.msdn.com/junfeng/archive/2005/07/07/436755.aspx#9657747</link><pubDate>Fri, 29 May 2009 23:48:03 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9657747</guid><dc:creator>Aaron Stebner's WebLog</dc:creator><description>&lt;p&gt;I previously posted some sample code to detect the version(s) and service pack levels of the .NET Framework&lt;/p&gt;
</description></item></channel></rss>