<?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>COM Shim CLR Loader Bug</title><link>http://blogs.msdn.com/andreww/archive/2007/11/25/com-shim-clr-loader-bug.aspx</link><description>The latest version of the COM shim wizards was released back in the summer, here . With the help of Adam Smith of Xobni (and of course, the indispensable Misha), we've identified a minor bug with the project code that the wizard generates for the shim.</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>re: COM Shim CLR Loader Bug</title><link>http://blogs.msdn.com/andreww/archive/2007/11/25/com-shim-clr-loader-bug.aspx#6538616</link><pubDate>Tue, 27 Nov 2007 04:13:03 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6538616</guid><dc:creator>Tony Gravagno</dc:creator><description>&lt;p&gt;Andrew, I'll have a look at my code which was generated by the v2.3 wizard. Maybe the issue documented here is causing some of my grief. I'm one of the many people who try to create a managed automation add-in for Excel - we get all the way to deployment to a test box and then can't get the code work. I've blogged my experience for anyone who cares to read - it includes a complete walk through for anyone who wants to use managed code behind Excel formulas via a shim. Might you be able to provide some of your well respected wisdom to assist?&lt;/p&gt;
&lt;p&gt;remove.munge.pleaseNebula-RnD.com/blog&lt;/p&gt;
&lt;p&gt;(Part 1 introduces concepts and has a lot of links. Parts 2-4 are intermediate notes of frustration with more reference links. Part 5 is the summary and tutorial.)&lt;/p&gt;
&lt;p&gt;Thanks for any tips. As you'll note from my many references to you on my blog, I sincerely appreciate your public postings on this topic.&lt;/p&gt;
</description></item><item><title>re: COM Shim CLR Loader Bug</title><link>http://blogs.msdn.com/andreww/archive/2007/11/25/com-shim-clr-loader-bug.aspx#6890548</link><pubDate>Sat, 29 Dec 2007 03:47:16 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6890548</guid><dc:creator>Tony Gravagno</dc:creator><description>&lt;p&gt;I've incorporated the fix according to this article. I know the shim code is being invoked on a deployment system, but I still can't get the shim to call my managed Excel UDF. The problem is that the proper registry keys are not being generated, either via the COM Shim Wizard or from the Setup Project. Complete details are in my own blog - get there from the unmunged link associated with this comment.&lt;/p&gt;
</description></item><item><title>re: COM Shim CLR Loader Bug</title><link>http://blogs.msdn.com/andreww/archive/2007/11/25/com-shim-clr-loader-bug.aspx#9117956</link><pubDate>Tue, 18 Nov 2008 13:57:42 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9117956</guid><dc:creator>Steve D.</dc:creator><description>&lt;p&gt;We experienced a problem with our COM Shim created by the Wizard - the call to CorBindToRuntimeEx was failing with error 0x80131700. We found that specifying the version as the 1st parameter to the call resolved the issue.&lt;/p&gt;
</description></item><item><title>re: COM Shim CLR Loader Bug</title><link>http://blogs.msdn.com/andreww/archive/2007/11/25/com-shim-clr-loader-bug.aspx#9119700</link><pubDate>Tue, 18 Nov 2008 21:50:54 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9119700</guid><dc:creator>andreww</dc:creator><description>&lt;p&gt;Steve - specifying the CLR version to load in CorBindToRuntimeEx is generally a BAD thing to do. The generated shim code specifies null for this parameter, which by default causes the latest version of the CLR to get loaded. Up to CLR 2.0 (and .NET Fx 3.5), the CLR has a very high level of backwards compatibility. This means that loading the latest CLR is almost always the right thing to do (that's why it's the default). Loading an earlier CLR will almost certainly break any add-ins, smart tags, or other managed components that have a dependency on a later CLR.&lt;/p&gt;
&lt;p&gt;I strongly advise you to debug your solution environment to find out why CorBindToRuntimeEx was failing in the first place. The most likely reason is that some other version of the CLR has already been loaded in the process. Typically this would be done by some component calling CorBindToRuntimeEx with a specific CLR version (ie, exactly the approach you've discovered), or via an Exe config.&lt;/p&gt;
</description></item><item><title>re: COM Shim CLR Loader Bug</title><link>http://blogs.msdn.com/andreww/archive/2007/11/25/com-shim-clr-loader-bug.aspx#9164010</link><pubDate>Tue, 02 Dec 2008 13:23:08 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9164010</guid><dc:creator>Mehul</dc:creator><description>&lt;p&gt;Does this CLR loading problem, would cause any issue on deployment machine, or it is only development machine specific issue&lt;/p&gt;
</description></item><item><title>re: COM Shim CLR Loader Bug</title><link>http://blogs.msdn.com/andreww/archive/2007/11/25/com-shim-clr-loader-bug.aspx#9165664</link><pubDate>Tue, 02 Dec 2008 21:57:22 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9165664</guid><dc:creator>andreww</dc:creator><description>&lt;p&gt;Mehul - as I explained, the problem was in the code that was generated by the wizard, which will run on both the dev machine and the end-user's machine.&lt;/p&gt;
&lt;p&gt;Note that this problem has been fixed in the latest version of the wizard, described here: &lt;a rel="nofollow" target="_new" href="http://msdn.microsoft.com/en-us/library/bb508939.aspx"&gt;http://msdn.microsoft.com/en-us/library/bb508939.aspx&lt;/a&gt;&lt;/p&gt;
</description></item></channel></rss>