<?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>Registering an Assembly for COM Interop in a MSI file with the Windows Installer XML toolset.</title><link>http://blogs.msdn.com/robmen/archive/2004/04/28/122491.aspx</link><description>Imagine a blog entry where I dig into problems to think about when writing CustomActions and try to provide a better solution for registering COM Interop for .NET assemblies.</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>re: Registering an Assembly for COM Interop in a MSI file with the Windows Installer XML toolset.</title><link>http://blogs.msdn.com/robmen/archive/2004/04/28/122491.aspx#122610</link><pubDate>Thu, 29 Apr 2004 02:11:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:122610</guid><dc:creator>Omar Shahine</dc:creator><description>Hey,&lt;br&gt;&lt;br&gt;The custom action thing was something I did as a work around when I didn't know what else to do, but I'm not doing that any more. I'm assing the assembly file and setting that to be registered and not using the Custom Action any longer. Does that make sense? Is that still problematic?</description></item><item><title>re: Registering an Assembly for COM Interop in a MSI file with the Windows Installer XML toolset.</title><link>http://blogs.msdn.com/robmen/archive/2004/04/28/122491.aspx#122958</link><pubDate>Thu, 29 Apr 2004 14:37:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:122958</guid><dc:creator>Rob Mensching</dc:creator><description>Heh, Omar, I find it amusing, but I'm not sure what &amp;quot;assing the assembly file&amp;quot; means in this context.&lt;br&gt;&lt;br&gt;Also, posted this entry more to demonstrate how hard it is to create CustomActions correctly.  I always get nervous when people with CustomActions in their setup say, &amp;quot;Now you can safely rely on MSI...&amp;quot; because they've just modified the installation path and rarely understand the implications of those modifications.&lt;br&gt;&lt;br&gt;Finally, no offense intended (if any felt implied).</description></item><item><title>re: Registering an Assembly for COM Interop in a MSI file with the Windows Installer XML toolset.</title><link>http://blogs.msdn.com/robmen/archive/2004/04/28/122491.aspx#123085</link><pubDate>Thu, 29 Apr 2004 17:08:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:123085</guid><dc:creator>Jiho Han</dc:creator><description>Rob,&lt;br&gt;&lt;br&gt;Does using the WiX toolset remedy the uninstall scenario - with two products and one getting uninstalled?&lt;br&gt;&lt;br&gt;Thanks</description></item><item><title>re: Registering an Assembly for COM Interop in a MSI file with the Windows Installer XML toolset.</title><link>http://blogs.msdn.com/robmen/archive/2004/04/28/122491.aspx#123208</link><pubDate>Thu, 29 Apr 2004 19:06:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:123208</guid><dc:creator>damir</dc:creator><description>Rob,&lt;br&gt;&lt;br&gt;a bit unrelated question: is there a way to find out through WMI which components did Windows Installer install as part of some install?&lt;br&gt;&lt;br&gt;For example, if I install Office 2003, I can figure out through WMI  that office is installed, but is there a way to know which components -- thait is, somebody choose not to install Picture Editor. (Either through wmi or some other method).&lt;br&gt;&lt;br&gt;Sorry if this is out of scope, but your mention of you doing office deployments caught my attention. ;-)&lt;br&gt;&lt;br&gt;Thanks</description></item><item><title>re: Registering an Assembly for COM Interop in a MSI file with the Windows Installer XML toolset.</title><link>http://blogs.msdn.com/robmen/archive/2004/04/28/122491.aspx#123306</link><pubDate>Thu, 29 Apr 2004 20:52:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:123306</guid><dc:creator>Omar Shahine</dc:creator><description>Sorry, let me be more clear.&lt;br&gt;&lt;br&gt;The final work around in my post talks about how to get COM Registration to work w/p using a custom action. Instead of adding the project output of your project to the setup, you add the actual dll or assembly. You mark that assembly for vsaCOM and it's registered w/o the need for a Custom Action. That seems to be the best work around and the one I am recommending (not the custom action method).&lt;br&gt;&lt;br&gt;Sorry if I wasn't clear (and sorry for my horrible spelling!).</description></item><item><title>re: Registering an Assembly for COM Interop in a MSI file with the Windows Installer XML toolset.</title><link>http://blogs.msdn.com/robmen/archive/2004/04/28/122491.aspx#123598</link><pubDate>Fri, 30 Apr 2004 05:28:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:123598</guid><dc:creator>Rob Mensching</dc:creator><description>Jiho,&lt;br&gt;&lt;br&gt;Yes, the uninstall scenario will be handled correctly as long as you do two things:&lt;br&gt;&lt;br&gt;1.  Respect the Component Rules: &lt;a target="_new" href="http://blogs.msdn.com/robmen/archive/2003/10/18/56497.aspx"&gt;http://blogs.msdn.com/robmen/archive/2003/10/18/56497.aspx&lt;/a&gt;&lt;br&gt;&lt;br&gt;2.  Install the file to the same place in each Component.  I'll write more about this point later.</description></item><item><title>re: Registering an Assembly for COM Interop in a MSI file with the Windows Installer XML toolset.</title><link>http://blogs.msdn.com/robmen/archive/2004/04/28/122491.aspx#123604</link><pubDate>Fri, 30 Apr 2004 05:32:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:123604</guid><dc:creator>Rob Mensching</dc:creator><description>damir,&lt;br&gt;&lt;br&gt;I know you can query a fair bit of Windows Installer information via WMI.  Unfortunately, I don't play with WMI so I can't really provide any specifics.  Best luck on you searching... if I ever read up on the topic in the future, I'll be sure to post something here.</description></item><item><title>re: Registering an Assembly for COM Interop in a MSI file with the Windows Installer XML toolset.</title><link>http://blogs.msdn.com/robmen/archive/2004/04/28/122491.aspx#123718</link><pubDate>Fri, 30 Apr 2004 10:54:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:123718</guid><dc:creator>damir</dc:creator><description>Rob, thanks for replying.</description></item><item><title>re: Registering an Assembly for COM Interop in a MSI file with the Windows Installer XML toolset.</title><link>http://blogs.msdn.com/robmen/archive/2004/04/28/122491.aspx#124702</link><pubDate>Sun, 02 May 2004 13:53:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:124702</guid><dc:creator>David Levine</dc:creator><description>There's another issue related to uninstall (an upgrade, really) that I've recently run into that will impact this. It turns out that MSI creates/hosts a single appdomain (the default appdomain) that it uses to load all managed assemblies when it runs custom actions in them. &lt;br&gt;&lt;br&gt;This isn't a problem during an install or uninstall, but during an upgrade (i.e. detecting and automatically removing an old installation and then installing a new application) it first calls the custom action in the assembly being removed, then it deletes the old assemblies, installs the new assemblies and again calls the custom action in it. The problem is that if the custom action is in the same assembly (i.e. the assembly has the same name, but is a different version) it will wind up running the custom action code in the previous assembly that you thought had just been uninstalled. &lt;br&gt;&lt;br&gt;The reason is that once an assembly is loaded into an appdomain it never gets unloaded. MSI uses a single appdomain, it never gets unloaded, so even though you think you are running code in the new assembly it is really running the code in the old assembly.&lt;br&gt;&lt;br&gt;Yet another reason for avoiding custom actions...or for not using the automatic upgrade option.&lt;br&gt;&lt;br&gt;&lt;br&gt;</description></item><item><title>When COM Registration fails in an MSI (vsdraCOM has no affect)</title><link>http://blogs.msdn.com/robmen/archive/2004/04/28/122491.aspx#130316</link><pubDate>Wed, 12 May 2004 10:28:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:130316</guid><dc:creator>Omar Shahine's WebLog</dc:creator><description /></item><item><title>re: Registering an Assembly for COM Interop in a MSI file with the Windows Installer XML toolset.</title><link>http://blogs.msdn.com/robmen/archive/2004/04/28/122491.aspx#159686</link><pubDate>Fri, 18 Jun 2004 21:41:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:159686</guid><dc:creator>mohd fairol</dc:creator><description>no yet.help setting .</description></item><item><title>re: Registering an Assembly for COM Interop in a MSI file with the Windows Installer XML toolset.</title><link>http://blogs.msdn.com/robmen/archive/2004/04/28/122491.aspx#179644</link><pubDate>Sat, 10 Jul 2004 23:29:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:179644</guid><dc:creator>Ewan MacIntyre</dc:creator><description>Why do MSI files created through Visual Studio&lt;br&gt;.NET such that assemblies will be registered&lt;br&gt;for COM interop, have the appropriate&lt;br&gt;registry keys listed explicitly in the&lt;br&gt;installer XML? Surely this info is already&lt;br&gt;in the TLB, and since this can in turn be&lt;br&gt;extracted from the assembly, there's no point&lt;br&gt;in duplicating it?</description></item><item><title>使用 C# 进行 Outlook 2003 编程的简介</title><link>http://blogs.msdn.com/robmen/archive/2004/04/28/122491.aspx#399291</link><pubDate>Sun, 20 Mar 2005 09:42:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:399291</guid><dc:creator>leida1983</dc:creator><description>Ping Back来自：blog.csdn.net</description></item><item><title>re: Registering an Assembly for COM Interop in a MSI file with the Windows Installer XML toolset.</title><link>http://blogs.msdn.com/robmen/archive/2004/04/28/122491.aspx#471557</link><pubDate>Tue, 20 Sep 2005 03:15:50 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:471557</guid><dc:creator>Phil Wilson</dc:creator><description>As a rather tardy response to Ewan McIntyre's comment, when VS does the vsdraCOM thing on an assembly it basically runs regasm with the option to create a .reg file, and then it imports the .reg file. There is no .tlb registration when this happens (this is clear from looking in the resulting MSI file). If you need type library registration, use tlbexp to create one from your assembly and add it to the setup, and use the vsdr(x)COM Register setting. VS does not do this for you! This behavior where VS does not do the same as regasm (because of the missing typelib registration) seems to cause no end of bother. </description></item><item><title>re: Registering an Assembly for COM Interop in a MSI file with the Windows Installer XML toolset.</title><link>http://blogs.msdn.com/robmen/archive/2004/04/28/122491.aspx#491799</link><pubDate>Fri, 11 Nov 2005 18:56:42 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:491799</guid><dc:creator>brian</dc:creator><description>I noticed that the WixEdit compiler is inidicating an error when I use AssemblyRegisterComInterop=&amp;quot;yes&amp;quot; in version 2.0.3220.  Has this been removed?&lt;br&gt;&lt;br&gt;thanks&lt;br&gt;&lt;br&gt;brian</description></item><item><title>re: Registering an Assembly for COM Interop in a MSI file with the Windows Installer XML toolset.</title><link>http://blogs.msdn.com/robmen/archive/2004/04/28/122491.aspx#491931</link><pubDate>Sat, 12 Nov 2005 01:00:31 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:491931</guid><dc:creator>robmen</dc:creator><description>Brian, yes the AssemblyRegisterComInterop attribute was removed along with all of the other Resource generation code.  Generating Resources is a very dangerous thing to do because the Component Rules have to be respected.  &lt;br&gt;&lt;br&gt;The tallow.exe tool was created to extract the information from your file once and is the substitution for AssemblyRegisterComInterop.</description></item><item><title>re: Registering an Assembly for COM Interop in a MSI file with the Windows Installer XML toolset.</title><link>http://blogs.msdn.com/robmen/archive/2004/04/28/122491.aspx#526099</link><pubDate>Tue, 07 Feb 2006 02:07:39 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:526099</guid><dc:creator>Marco Casalaina</dc:creator><description>Has this issue been addressed in VS 2005? &amp;nbsp;I'm still on 2003, but I would be inclined to upgrade if it would fix this &amp;nbsp;issue.</description></item><item><title>re: Registering an Assembly for COM Interop in a MSI file with the Windows Installer XML toolset.</title><link>http://blogs.msdn.com/robmen/archive/2004/04/28/122491.aspx#583097</link><pubDate>Tue, 25 Apr 2006 17:01:41 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:583097</guid><dc:creator>Nektar</dc:creator><description>The question that nobody has still asked is why was there such a problem in the first place? Ie. why when building an Outlook add-in through Visual Studio 2003 and when you allow the default behaviour of registering the main project output, com registration may fail? Has Omar found the reasons behind this issue?</description></item></channel></rss>