VS 2008 closes at build, Outlook 2007 Add-In<p>Visual Studio 2008 abruptly closes when I try to build an Outlook 2007 Add In.</p> <p class=MsoNoSpacing style="margin:0in 0in 0pt"> </p> <p class=MsoNoSpacing style="margin:0in 0in 0pt">My workstation is configured as follows:</p> <ul> <li> <div class=MsoNoSpacing style="margin:0in 0in 0pt">Windows XP Professional</div> <li> <div class=MsoNoSpacing style="margin:0in 0in 0pt">Outlook 2007 SP1</div> <li> <div class=MsoNoSpacing style="margin:0in 0in 0pt">Visual Studio Team System 2008 Development Edition</div> <li> <div class=MsoNoSpacing style="margin:0in 0in 0pt">Microsoft .Net Framework 3.5</div> <li> <div class=MsoNoSpacing style="margin:0in 0in 0pt" align=left>VS 2008 Web Development Hot-Fix Roll-Up -- Recommended by Scott Gu at:<br><a title="http://weblogs.asp.net/scottgu/archive/2008/02/08/vs-2008-web-development-hot-fix-roll-up-available.aspx" href="http://weblogs.asp.net/scottgu/archive/2008/02/08/vs-2008-web-development-hot-fix-roll-up-available.aspx">http://weblogs.asp.net/scottgu/archive/2008/02/08/vs-2008-web-development-hot-fix-roll-up-available.aspx</a></div></li></ul> <p class=MsoNoSpacing style="margin:0in 0in 0pt"> </p> <p class=MsoNoSpacing style="margin:0in 0in 0pt">Originally I thought this was a code problem in my add-in, or that perhaps my PC needed to be rebooted.<span>  </span>This morning I powered off and rebooted.<span>  Additionally, I read that Outlook needed to be closed before building an add-in.<span>  </span>I also tried that, but it still did not work.  </span>Steps to replicate my problem are below.</p> <p class=MsoNoSpacing style="margin:0in 0in 0pt"> </p> <p class=MsoNoSpacing style="margin:0in 0in 0pt"><strong>Steps to replicate my problem.</strong></p> <ol> <li> <div class=MsoNoSpacing style="margin:0in 0in 0pt">Boot computer and do not open Outlook.</div> <li> <div class=MsoNoSpacing style="margin:0in 0in 0pt">Open VS 2008</div> <li> <div class=MsoNoSpacing style="margin:0in 0in 0pt">Select File &gt; New Project &gt; Visual C# &gt; Office &gt; 2007 &gt; Outlook 2007 Add-In.</div> <li> <div class=MsoNoSpacing style="margin:0in 0in 0pt">Choose the default name and then OK.</div> <li> <div class=MsoNoSpacing style="margin:0in 0in 0pt">Select Build &gt; Build OutlookAddIn1.</div></li></ol> <p class=MsoNoSpacing style="margin:0in 0in 0pt">I suspect that this may be related to the registry settings that VS 2008 attempts to make when it builds an Add-In.<span>  </span>Here is an excerpt from Professional C# 2008 that lead me to this hypothesis.</p> <p class=MsoNoSpacing style="margin:0in 0in 0pt"> </p> <p class=MsoNoSpacing style="margin:0in 0in 0pt"><strong><em>Managing Application-Level Add-Ins</em></strong></p> <p class=MsoNoSpacing style="margin:0in 0in 0pt"><em>One of the first things you will find when you create an application-level add-in is that VS carries out all the steps necessary to register the add-in with the Office application.<span>  </span>This means that registry entries are added so </em></p> <p class=MsoNoSpacing style="margin:0in 0in 0pt"><em>that when the Office application starts, it will automatically locate and load your assembly.<span>  </span>If you subsequently want to add or remove add-ins, then you must either navigate through Office application settings or manipulate the registry manually.</em></p> <p class=MsoNoSpacing style="margin:0in 0in 0pt"> </p> <p class=MsoNoSpacing style="margin:0in 0in 0pt">The build output window briefly appears and displays the following. Note this is from a screen shot, and I was unable to read all the contents of this.</p> <p class=MsoNoSpacing style="margin:0in 0in 0pt"> </p> <p class=MsoNoSpacing style="margin:0in 0in 0pt"><font face=Courier>Build started: Project OutlookAddIn1, Configuration: Debug Any CPU c:\WINDOWS\Microsoft.NET\Framework\v3.5\Csc.exe /noconfig /nowarn:1701,1702 /warn:4 /define: DEBUG;TRACE /reference:c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Accessibility.dll /reference:&quot;C:\Program Files\Microsoft Visual Studio 9</font></p> <p class=MsoNoSpacing style="margin:0in 0in 0pt"> </p> <p class=MsoNoSpacing style="margin:0in 0in 0pt">After that Visual Studio 2008 abruptly closes.  No error message or warning appears, and the &quot;Report problem to Microsoft&quot; dialog does not appear.</p> <p class=MsoNoSpacing style="margin:0in 0in 0pt"> </p> <p class=MsoNoSpacing style="margin:0in 0in 0pt">This problem also occurs if VB.Net is selected in Step 3.<span>  </span>And it occurs if  Outlook 2007 is opened before opening VS 2008.</p> <p class=MsoNoSpacing style="margin:0in 0in 0pt"> </p> <p class=MsoNoSpacing style="margin:0in 0in 0pt">Some relevant project properties are below (Project &gt; OutlookAddIn1 Properties).<span>  </span>If you need something else from this let me know and I can respond.</p> <ul> <li> <div class=MsoNoSpacing style="margin:0in 0in 0pt">Target Framework: .NET Framework 3.5</div> <li> <div class=MsoNoSpacing style="margin:0in 0in 0pt">Build Config: Active (Debug)</div> <li> <div class=MsoNoSpacing style="margin:0in 0in 0pt">Platform: Active (Any CPU)</div> <li> <div class=MsoNoSpacing style="margin:0in 0in 0pt">Define DEBUG Constant: Checked</div> <li> <div class=MsoNoSpacing style="margin:0in 0in 0pt">Define TRACE Constant: Checked</div> <li> <div class=MsoNoSpacing style="margin:0in 0in 0pt">Warning Level: 4</div> <li> <div class=MsoNoSpacing style="margin:0in 0in 0pt">Treat warnings as errors: None</div> <li> <div class=MsoNoSpacing style="margin:0in 0in 0pt">Output Path: bin\Debug\</div> <li> <div class=MsoNoSpacing style="margin:0in 0in 0pt">Generate serialization assembly: Auto</div></li></ul> <p class=MsoNoSpacing style="margin:0in 0in 0pt">Perhaps there is something else I need to install in VS, like a patch or plug in.</p> <p class=MsoNoSpacing style="margin:0in 0in 0pt"> </p> <p class=MsoNoSpacing style="margin:0in 0in 0pt">At the Outlook Programming Forms messageboard (also at Microsoft), Ken Slovak suggested that I perform a VS detect and repair.  Right now I'm in the process of downloading the .iso file again to do just this.  Additionally, he did not experience this problem when he executed the steps indicated above.</p> <p class=MsoNoSpacing style="margin:0in 0in 0pt" align=left> </p> <p class=MsoNoSpacing style="margin:0in 0in 0pt" align=left>Once the .iso is downloaded I'll try the repair again.</p> <p class=MsoNoSpacing style="margin:0in 0in 0pt" align=left> </p> <p class=MsoNoSpacing style="margin:0in 0in 0pt" align=left>P.S. The original problem was posted at <a title="http://www.microsoft.com/communities/newsgroups/en-us/default.aspx?dg=microsoft.public.outlook.program_forms&amp;cat=en_US_c8f74307-7854-417a-8dcd-897dda2e2446&amp;lang=en&amp;cr=US" href="http://www.microsoft.com/communities/newsgroups/en-us/default.aspx?dg=microsoft.public.outlook.program_forms&amp;cat=en_US_c8f74307-7854-417a-8dcd-897dda2e2446&amp;lang=en&amp;cr=US">http://www.microsoft.com/communities/newsgroups/en-us/default.aspx?dg=microsoft.public.outlook.program_forms&amp;cat=en_US_c8f74307-7854-417a-8dcd-897dda2e2446&amp;lang=en&amp;cr=US</a>, where it was suggested that I post this in a more appropriate area.  I hope this is more appropriate.  Thanks.</p>© 2009 Microsoft Corporation. All rights reserved.Thu, 13 Aug 2009 07:12:27 Z99e124d0-c5d7-49c0-b1dd-71328f9a6571http://social.msdn.microsoft.com/Forums/en-US/vsto/thread/99e124d0-c5d7-49c0-b1dd-71328f9a6571#99e124d0-c5d7-49c0-b1dd-71328f9a6571http://social.msdn.microsoft.com/Forums/en-US/vsto/thread/99e124d0-c5d7-49c0-b1dd-71328f9a6571#99e124d0-c5d7-49c0-b1dd-71328f9a6571KenPalmerhttp://social.msdn.microsoft.com/Profile/en-US/?user=KenPalmerVS 2008 closes at build, Outlook 2007 Add-In<p>Visual Studio 2008 abruptly closes when I try to build an Outlook 2007 Add In.</p> <p class=MsoNoSpacing style="margin:0in 0in 0pt"> </p> <p class=MsoNoSpacing style="margin:0in 0in 0pt">My workstation is configured as follows:</p> <ul> <li> <div class=MsoNoSpacing style="margin:0in 0in 0pt">Windows XP Professional</div> <li> <div class=MsoNoSpacing style="margin:0in 0in 0pt">Outlook 2007 SP1</div> <li> <div class=MsoNoSpacing style="margin:0in 0in 0pt">Visual Studio Team System 2008 Development Edition</div> <li> <div class=MsoNoSpacing style="margin:0in 0in 0pt">Microsoft .Net Framework 3.5</div> <li> <div class=MsoNoSpacing style="margin:0in 0in 0pt" align=left>VS 2008 Web Development Hot-Fix Roll-Up -- Recommended by Scott Gu at:<br><a title="http://weblogs.asp.net/scottgu/archive/2008/02/08/vs-2008-web-development-hot-fix-roll-up-available.aspx" href="http://weblogs.asp.net/scottgu/archive/2008/02/08/vs-2008-web-development-hot-fix-roll-up-available.aspx">http://weblogs.asp.net/scottgu/archive/2008/02/08/vs-2008-web-development-hot-fix-roll-up-available.aspx</a></div></li></ul> <p class=MsoNoSpacing style="margin:0in 0in 0pt"> </p> <p class=MsoNoSpacing style="margin:0in 0in 0pt">Originally I thought this was a code problem in my add-in, or that perhaps my PC needed to be rebooted.<span>  </span>This morning I powered off and rebooted.<span>  Additionally, I read that Outlook needed to be closed before building an add-in.<span>  </span>I also tried that, but it still did not work.  </span>Steps to replicate my problem are below.</p> <p class=MsoNoSpacing style="margin:0in 0in 0pt"> </p> <p class=MsoNoSpacing style="margin:0in 0in 0pt"><strong>Steps to replicate my problem.</strong></p> <ol> <li> <div class=MsoNoSpacing style="margin:0in 0in 0pt">Boot computer and do not open Outlook.</div> <li> <div class=MsoNoSpacing style="margin:0in 0in 0pt">Open VS 2008</div> <li> <div class=MsoNoSpacing style="margin:0in 0in 0pt">Select File &gt; New Project &gt; Visual C# &gt; Office &gt; 2007 &gt; Outlook 2007 Add-In.</div> <li> <div class=MsoNoSpacing style="margin:0in 0in 0pt">Choose the default name and then OK.</div> <li> <div class=MsoNoSpacing style="margin:0in 0in 0pt">Select Build &gt; Build OutlookAddIn1.</div></li></ol> <p class=MsoNoSpacing style="margin:0in 0in 0pt">I suspect that this may be related to the registry settings that VS 2008 attempts to make when it builds an Add-In.<span>  </span>Here is an excerpt from Professional C# 2008 that lead me to this hypothesis.</p> <p class=MsoNoSpacing style="margin:0in 0in 0pt"> </p> <p class=MsoNoSpacing style="margin:0in 0in 0pt"><strong><em>Managing Application-Level Add-Ins</em></strong></p> <p class=MsoNoSpacing style="margin:0in 0in 0pt"><em>One of the first things you will find when you create an application-level add-in is that VS carries out all the steps necessary to register the add-in with the Office application.<span>  </span>This means that registry entries are added so </em></p> <p class=MsoNoSpacing style="margin:0in 0in 0pt"><em>that when the Office application starts, it will automatically locate and load your assembly.<span>  </span>If you subsequently want to add or remove add-ins, then you must either navigate through Office application settings or manipulate the registry manually.</em></p> <p class=MsoNoSpacing style="margin:0in 0in 0pt"> </p> <p class=MsoNoSpacing style="margin:0in 0in 0pt">The build output window briefly appears and displays the following. Note this is from a screen shot, and I was unable to read all the contents of this.</p> <p class=MsoNoSpacing style="margin:0in 0in 0pt"> </p> <p class=MsoNoSpacing style="margin:0in 0in 0pt"><font face=Courier>Build started: Project OutlookAddIn1, Configuration: Debug Any CPU c:\WINDOWS\Microsoft.NET\Framework\v3.5\Csc.exe /noconfig /nowarn:1701,1702 /warn:4 /define: DEBUG;TRACE /reference:c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Accessibility.dll /reference:&quot;C:\Program Files\Microsoft Visual Studio 9</font></p> <p class=MsoNoSpacing style="margin:0in 0in 0pt"> </p> <p class=MsoNoSpacing style="margin:0in 0in 0pt">After that Visual Studio 2008 abruptly closes.  No error message or warning appears, and the &quot;Report problem to Microsoft&quot; dialog does not appear.</p> <p class=MsoNoSpacing style="margin:0in 0in 0pt"> </p> <p class=MsoNoSpacing style="margin:0in 0in 0pt">This problem also occurs if VB.Net is selected in Step 3.<span>  </span>And it occurs if  Outlook 2007 is opened before opening VS 2008.</p> <p class=MsoNoSpacing style="margin:0in 0in 0pt"> </p> <p class=MsoNoSpacing style="margin:0in 0in 0pt">Some relevant project properties are below (Project &gt; OutlookAddIn1 Properties).<span>  </span>If you need something else from this let me know and I can respond.</p> <ul> <li> <div class=MsoNoSpacing style="margin:0in 0in 0pt">Target Framework: .NET Framework 3.5</div> <li> <div class=MsoNoSpacing style="margin:0in 0in 0pt">Build Config: Active (Debug)</div> <li> <div class=MsoNoSpacing style="margin:0in 0in 0pt">Platform: Active (Any CPU)</div> <li> <div class=MsoNoSpacing style="margin:0in 0in 0pt">Define DEBUG Constant: Checked</div> <li> <div class=MsoNoSpacing style="margin:0in 0in 0pt">Define TRACE Constant: Checked</div> <li> <div class=MsoNoSpacing style="margin:0in 0in 0pt">Warning Level: 4</div> <li> <div class=MsoNoSpacing style="margin:0in 0in 0pt">Treat warnings as errors: None</div> <li> <div class=MsoNoSpacing style="margin:0in 0in 0pt">Output Path: bin\Debug\</div> <li> <div class=MsoNoSpacing style="margin:0in 0in 0pt">Generate serialization assembly: Auto</div></li></ul> <p class=MsoNoSpacing style="margin:0in 0in 0pt">Perhaps there is something else I need to install in VS, like a patch or plug in.</p> <p class=MsoNoSpacing style="margin:0in 0in 0pt"> </p> <p class=MsoNoSpacing style="margin:0in 0in 0pt">At the Outlook Programming Forms messageboard (also at Microsoft), Ken Slovak suggested that I perform a VS detect and repair.  Right now I'm in the process of downloading the .iso file again to do just this.  Additionally, he did not experience this problem when he executed the steps indicated above.</p> <p class=MsoNoSpacing style="margin:0in 0in 0pt" align=left> </p> <p class=MsoNoSpacing style="margin:0in 0in 0pt" align=left>Once the .iso is downloaded I'll try the repair again.</p> <p class=MsoNoSpacing style="margin:0in 0in 0pt" align=left> </p> <p class=MsoNoSpacing style="margin:0in 0in 0pt" align=left>P.S. The original problem was posted at <a title="http://www.microsoft.com/communities/newsgroups/en-us/default.aspx?dg=microsoft.public.outlook.program_forms&amp;cat=en_US_c8f74307-7854-417a-8dcd-897dda2e2446&amp;lang=en&amp;cr=US" href="http://www.microsoft.com/communities/newsgroups/en-us/default.aspx?dg=microsoft.public.outlook.program_forms&amp;cat=en_US_c8f74307-7854-417a-8dcd-897dda2e2446&amp;lang=en&amp;cr=US">http://www.microsoft.com/communities/newsgroups/en-us/default.aspx?dg=microsoft.public.outlook.program_forms&amp;cat=en_US_c8f74307-7854-417a-8dcd-897dda2e2446&amp;lang=en&amp;cr=US</a>, where it was suggested that I post this in a more appropriate area.  I hope this is more appropriate.  Thanks.</p>Mon, 09 Jun 2008 20:49:53 Z2008-06-16T12:58:01Zhttp://social.msdn.microsoft.com/Forums/en-US/vsto/thread/99e124d0-c5d7-49c0-b1dd-71328f9a6571#76b3ff24-e017-4f21-8ad2-18b771f264bbhttp://social.msdn.microsoft.com/Forums/en-US/vsto/thread/99e124d0-c5d7-49c0-b1dd-71328f9a6571#76b3ff24-e017-4f21-8ad2-18b771f264bbCindy Meisterhttp://social.msdn.microsoft.com/Profile/en-US/?user=Cindy%20MeisterVS 2008 closes at build, Outlook 2007 Add-In<p>Hi Ken</p> <p align=left> </p> <p align=left>I'm as much in the dark as you and Ken, but a couple of other trouble-shooting steps come to mind besides Repairing Visual Studio:</p> <p align=left> </p> <p align=left>1. does the same problem occur if you try to create an Add-in for Excel or Word (or any other Office app)? That should tell us whether the problem is with Outlook or not.</p> <p align=left> </p> <p align=left>2. If other application Add-ins do not cause VS to crash, try repairing Outlook, or uninstalling/reinstalling Office</p> <p align=left><font face=Arial size=2></font> </p>Tue, 10 Jun 2008 08:13:52 Z2008-06-10T08:13:52Zhttp://social.msdn.microsoft.com/Forums/en-US/vsto/thread/99e124d0-c5d7-49c0-b1dd-71328f9a6571#8db5c795-c0a1-4618-b752-1bc1f65eb6a0http://social.msdn.microsoft.com/Forums/en-US/vsto/thread/99e124d0-c5d7-49c0-b1dd-71328f9a6571#8db5c795-c0a1-4618-b752-1bc1f65eb6a0KenPalmerhttp://social.msdn.microsoft.com/Profile/en-US/?user=KenPalmerVS 2008 closes at build, Outlook 2007 Add-In<p align=left><font face=Arial size=2>Cindy,</font></p> <p align=left>That's a good idea.  I'll try those steps.  This morning while running the repair I was reading the article below.</p> <p align=left><a title="http://msdn.microsoft.com/en-us/library/cc136646.aspx" href="http://msdn.microsoft.com/en-us/library/cc136646.aspx">http://msdn.microsoft.com/en-us/library/cc136646.aspx</a></p> <p align=left> </p> <p align=left>In the &quot;Creating the Code Access Security Policies&quot; section of that article it displays a configuration tree as follows (this is abbreviated).</p> <p align=left>+ User</p> <p align=left>-- + Code Groups</p> <p align=left>----- + VSTOProjects</p> <p align=left> </p> <p align=left>My PC has User and Code Groups, but there is no VSTOProjects node.  Of course I just checked this right after the VS 2008 repair ran.  So that may have been wiped out.</p> <p align=left> </p> <p align=left>There was also a note in that section about the .NET Framework 2.0 Management Console Snap-In.  I think after rebooting I'm going to install that as well.</p> <p align=left> </p> <p align=left>This is my #1 priority right now.  I will continue to post my progress and the eventual solution for the benefit of others who hit this thread.  Thanks for your help Cindy.</p> <p align=left> </p> <p align=left>Ken</p>Tue, 10 Jun 2008 13:13:19 Z2008-06-10T13:13:19Zhttp://social.msdn.microsoft.com/Forums/en-US/vsto/thread/99e124d0-c5d7-49c0-b1dd-71328f9a6571#6ca62c25-dc17-4b24-81be-95babc481028http://social.msdn.microsoft.com/Forums/en-US/vsto/thread/99e124d0-c5d7-49c0-b1dd-71328f9a6571#6ca62c25-dc17-4b24-81be-95babc481028Cindy Meisterhttp://social.msdn.microsoft.com/Profile/en-US/?user=Cindy%20MeisterVS 2008 closes at build, Outlook 2007 Add-In<div class=quote> <table width="85%"> <tbody> <tr> <td class=txt4> <strong>Ken574961 wrote:</strong></td></tr> <tr> <td class=quoteTable> <table width="100%"> <tbody> <tr> <td class=txt4 valign=top width="100%"> <p align=left>In the &quot;Creating the Code Access Security Policies&quot; section of that article it displays a configuration tree as follows (this is abbreviated).</p> <p align=left>+ User</p> <p align=left>-- + Code Groups</p> <p align=left>----- + VSTOProjects</p> <p align=left> </p> <p align=left>My PC has User and Code Groups, but there is no VSTOProjects node.  Of course I just checked this right after the VS 2008 repair ran.  So that may have been wiped out.</p></td></tr></tbody></table></td></tr></tbody></table></div> <p></p> <p align=left> </p> <p align=left>Mmmm. On various machines I've seen both (with and without VSTOProjects). FWIW I doubt that's part of the problem you're struggling with (the crash).</p> <p align=left> </p>Good luck tracking this down! And we'll be looking forward to any resolution you can find. (I also hope that someone from the VSTO team jumps in here if they have any ideas!)Tue, 10 Jun 2008 13:35:38 Z2008-06-10T13:35:38Zhttp://social.msdn.microsoft.com/Forums/en-US/vsto/thread/99e124d0-c5d7-49c0-b1dd-71328f9a6571#a4740cf8-15cf-4002-994f-063a74a2e739http://social.msdn.microsoft.com/Forums/en-US/vsto/thread/99e124d0-c5d7-49c0-b1dd-71328f9a6571#a4740cf8-15cf-4002-994f-063a74a2e739KenPalmerhttp://social.msdn.microsoft.com/Profile/en-US/?user=KenPalmerVS 2008 closes at build, Outlook 2007 Add-In<p>Cindy,<br>Thanks again for the suggestions.  When the repair completed I rebooted, then tried creating 2007 Outlook, Excel, and Word add-ins.  The Excel and Word builds succeeded.  The Outlook build failed as per the first post -- the Visual Studio IDE simply closed unexpectedly.</p> <p align=left> </p> <p>Also out of curiosity I checked the 2.0 Configuration console.  The VSTOProgram nodes did not appear.</p> <p align=left> </p> <p>So I downloaded and installed the .NET Framework 2.0 SDK at :<br><a title="http://www.microsoft.com/downloads/details.aspx?FamilyID=fe6f2099-b7b4-4f47-a244-c96d69c35dec&amp;displaylang=en" href="http://www.microsoft.com/downloads/details.aspx?FamilyID=fe6f2099-b7b4-4f47-a244-c96d69c35dec&amp;displaylang=en">http://www.microsoft.com/downloads/details.aspx?FamilyID=fe6f2099-b7b4-4f47-a244-c96d69c35dec&amp;displaylang=en</a></p> <p> </p> <p align=left>After a shut-down, power off, reboot, I  launched Visual Studio 2008, created a new Outlook Add-In, and built.  Same problem.</p> <p align=left> </p> <p>I'll try an Outlook/Office repair next.  Cross your fingers!</p> <p><br> </p> <p align=left><font face=Arial size=2></font> </p>Tue, 10 Jun 2008 14:08:44 Z2008-06-10T14:08:44Zhttp://social.msdn.microsoft.com/Forums/en-US/vsto/thread/99e124d0-c5d7-49c0-b1dd-71328f9a6571#17397217-62dd-43b9-9cff-93a336c6308fhttp://social.msdn.microsoft.com/Forums/en-US/vsto/thread/99e124d0-c5d7-49c0-b1dd-71328f9a6571#17397217-62dd-43b9-9cff-93a336c6308fKenPalmerhttp://social.msdn.microsoft.com/Profile/en-US/?user=KenPalmerVS 2008 closes at build, Outlook 2007 Add-In<p align=left><font face=Arial size=2>Cindy,</font></p> <p align=left><font face=Arial size=2>Repairing Office Ultimate 2007 did not fix the problem.  As before, I rebooted, etc.</font></p> <p align=left> </p> <p align=left>After reading the article below, I thought to edit the &quot;Start external program&quot; settings in the project properties tab.  I pointed that setting to C:\Program Files\Microsoft Office\Office12\OUTLOOK.EXE, but that also had no impact on my problem.</p> <p align=left><a title="http://msdn.microsoft.com/en-us/library/bb226713.aspx" href="http://msdn.microsoft.com/en-us/library/bb226713.aspx">http://msdn.microsoft.com/en-us/library/bb226713.aspx</a></p> <p align=left> </p> <p align=left>That's as much stabbing in the dark as I care to do.  At this point I'm opening a support incident ticket with Microsoft.  When we determine the resolution I'll post it here.</p> <p align=left> </p> <p align=left>Ken</p> <p align=left> </p> <p align=left> </p>Tue, 10 Jun 2008 15:06:45 Z2008-06-10T15:06:45Zhttp://social.msdn.microsoft.com/Forums/en-US/vsto/thread/99e124d0-c5d7-49c0-b1dd-71328f9a6571#167b1425-8079-41a2-a1ea-7ed76ad9ea92http://social.msdn.microsoft.com/Forums/en-US/vsto/thread/99e124d0-c5d7-49c0-b1dd-71328f9a6571#167b1425-8079-41a2-a1ea-7ed76ad9ea92KenPalmerhttp://social.msdn.microsoft.com/Profile/en-US/?user=KenPalmerVS 2008 closes at build, Outlook 2007 Add-In<p align=left><font face=Arial>I've opened a support ticket with Microsoft.  In the meantime, I found this in the Application Event Log.</font></p> <p align=left><span style="font-size:8.5pt;font-family:'MS Shell Dlg'"></span> </p> <p><font face="MS Shell Dlg">.NET Runtime version 2.0.50727.1433 - Fatal Execution Engine Error (79FEC5F0) (80131506)</font></p><font face="MS Shell Dlg"> <p align=left><br></p></font> <p align=left><font face="MS Shell Dlg">Google returned the following for this:</font></p> <p align=left><font face="MS Shell Dlg"><a title="http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=330302" href="http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=330302">http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=330302</a></font></p> <p align=left><font face="MS Shell Dlg"><a title="http://forums.msdn.microsoft.com/en-US/vssetup/thread/cb73c8d6-077f-4220-aaf8-463039ee1d5f" href="http://forums.msdn.microsoft.com/en-US/vssetup/thread/cb73c8d6-077f-4220-aaf8-463039ee1d5f">http://forums.msdn.microsoft.com/en-US/vssetup/thread/cb73c8d6-077f-4220-aaf8-463039ee1d5f</a></font></p> <p align=left><font face="MS Shell Dlg"> </p>Those and some other links point to Power Commands.  I have Power Commands for Visual Studio 2008 installed.  For the most part I just use that to clean up my application list, so I'm going to uninstall that.  Maybe this will resolve the problem.</font>Tue, 10 Jun 2008 17:52:07 Z2008-06-10T17:52:07Zhttp://social.msdn.microsoft.com/Forums/en-US/vsto/thread/99e124d0-c5d7-49c0-b1dd-71328f9a6571#74b1881a-b34b-467c-8897-aa0d6fe7db6ehttp://social.msdn.microsoft.com/Forums/en-US/vsto/thread/99e124d0-c5d7-49c0-b1dd-71328f9a6571#74b1881a-b34b-467c-8897-aa0d6fe7db6eKenPalmerhttp://social.msdn.microsoft.com/Profile/en-US/?user=KenPalmerVS 2008 closes at build, Outlook 2007 Add-In<p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:10pt;color:#215868;font-family:'Arial','sans-serif'"><font color="#000000">Uninstalling Power Commands corrected the problem.</font></span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:10pt;color:#215868;font-family:'Arial','sans-serif'"><font color="#000000"></font></span> </p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:10pt;color:#215868;font-family:'Arial','sans-serif'"><font color="#000000">Here are steps to replicate the problem with Power Commands from the system setup indicated at the top of this thread.</font></span></p> <p class=MsoListParagraph style="margin:0in 0in 0pt 0.5in;text-indent:-0.25in"><font color="#000000"><span style="font-size:10pt;color:#215868;font-family:'Arial','sans-serif'"><span>1.<span style="font:7pt 'Times New Roman'">     </span></span></span><span style="font-size:10pt;color:#215868;font-family:'Arial','sans-serif'">Install Visual Studio 2008 Power Commands.</span></font></p> <p class=MsoListParagraph style="margin:0in 0in 0pt 0.5in;text-indent:-0.25in"><font color="#000000"><span style="font-size:10pt;color:#215868;font-family:'Arial','sans-serif'"><span>2.<span style="font:7pt 'Times New Roman'">     </span></span></span><span style="font-size:10pt;color:#215868;font-family:'Arial','sans-serif'">Open Visual Studio 2008 </span></font></p> <p class=MsoListParagraph style="margin:0in 0in 0pt 0.5in;text-indent:-0.25in"><font color="#000000"><span style="font-size:10pt;color:#215868;font-family:'Arial','sans-serif'"><span>3.<span style="font:7pt 'Times New Roman'">     </span></span></span><span style="font-size:10pt;color:#215868;font-family:'Arial','sans-serif'">Select File &gt; New Project &gt; Visual C# &gt; Office &gt; 2007 &gt; Outlook 2007 Add-In.</span></font></p> <p class=MsoListParagraph style="margin:0in 0in 0pt 0.5in;text-indent:-0.25in"><font color="#000000"><span style="font-size:10pt;color:#215868;font-family:'Arial','sans-serif'"><span>4.<span style="font:7pt 'Times New Roman'">     </span></span></span><span style="font-size:10pt;color:#215868;font-family:'Arial','sans-serif'">Choose the default name and then OK.</span></font></p> <p class=MsoListParagraph style="margin:0in 0in 0pt 0.5in;text-indent:-0.25in"><font color="#000000"><span style="font-size:10pt;color:#215868;font-family:'Arial','sans-serif'"><span>5.<span style="font:7pt 'Times New Roman'">     </span></span></span><span style="font-size:10pt;color:#215868;font-family:'Arial','sans-serif'">Select Build &gt; Build OutlookAddIn1.</span></font></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:10pt;color:#215868;font-family:'Arial','sans-serif'"><font color="#000000"></font></span> </p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:10pt;color:#215868;font-family:'Arial','sans-serif'"><font color="#000000">The Output dialog will open, display a line, and then Visual Studio will abruptly close.</font></span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:10pt;color:#215868;font-family:'Arial','sans-serif'"></span> </p> <p class=MsoListParagraph style="margin:0in 0in 0pt 0.5in;text-indent:-0.25in"><font color="#000000"><span style="font-size:10pt;color:#215868;font-family:'Arial','sans-serif'"><span>6.<span style="font:7pt 'Times New Roman'">     </span></span></span><span style="font-size:10pt;color:#215868;font-family:'Arial','sans-serif'">Now close Visual Studio</span></font></p> <p class=MsoListParagraph style="margin:0in 0in 0pt 0.5in;text-indent:-0.25in"><font color="#000000"><span style="font-size:10pt;color:#215868;font-family:'Arial','sans-serif'"><span>7.<span style="font:7pt 'Times New Roman'">     </span></span></span><span style="font-size:10pt;color:#215868;font-family:'Arial','sans-serif'">Uninstall Power Commands</span></font></p> <p class=MsoListParagraph style="margin:0in 0in 0pt 0.5in;text-indent:-0.25in"><font color="#000000"><span style="font-size:10pt;color:#215868;font-family:'Arial','sans-serif'"><span>8.<span style="font:7pt 'Times New Roman'">     </span></span></span><span style="font-size:10pt;color:#215868;font-family:'Arial','sans-serif'">Open Visual Studio</span></font></p> <p class=MsoListParagraph style="margin:0in 0in 0pt 0.5in;text-indent:-0.25in"><font color="#000000"><span style="font-size:10pt;color:#215868;font-family:'Arial','sans-serif'"><span>9.<span style="font:7pt 'Times New Roman'">     </span></span></span><span style="font-size:10pt;color:#215868;font-family:'Arial','sans-serif'">Follow steps 2 through 5.</span></font></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:10pt;color:#215868;font-family:'Arial','sans-serif'"><font color="#000000"></font></span> </p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:10pt;color:#215868;font-family:'Arial','sans-serif'"><font color="#000000">The Outlook Add-In project will build successfully.</font></span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:10pt;color:#215868;font-family:'Arial','sans-serif'"><font color="#000000"></font></span> </p><span style="font-size:10pt;color:#215868;font-family:'Arial','sans-serif'"><font color="#000000">Since I was able to replicate this a couple of times, I’m confident that this problem is directly related to Visual Studio 2008 Power Commands.</font>  </span> <p align=left><font face=Arial size=2></font> </p>Tue, 10 Jun 2008 18:21:29 Z2008-06-16T12:58:07Zhttp://social.msdn.microsoft.com/Forums/en-US/vsto/thread/99e124d0-c5d7-49c0-b1dd-71328f9a6571#0c172b81-94b6-43eb-bdce-5a508f026eedhttp://social.msdn.microsoft.com/Forums/en-US/vsto/thread/99e124d0-c5d7-49c0-b1dd-71328f9a6571#0c172b81-94b6-43eb-bdce-5a508f026eedKenPalmerhttp://social.msdn.microsoft.com/Profile/en-US/?user=KenPalmerVS 2008 closes at build, Outlook 2007 Add-In<p align=left><font face=Arial>A Microsoft engineer worked on a support incident regarding this issue.  As a result we have a work-around.</font></p> <p align=left> </p> <p align=left><strong>Symptom:</strong></p> <p align=left>Visual Studio 2008 crashed after building an Outlook 2007 add-in project. This occurs after PowerCommands is installed. Uninstalling PowerCommands makes the issue go away.</p> <p align=left> </p> <p align=left> </p> <p align=left><strong>Root Cause:</strong></p> <p align=left>This is not a PowerCommands issue but rather a problem with the CLR itself where this problem manifests if assemblies are loaded in a certain order.  Installing PowerCommands and then creating a new Outlook 2007 project causes assemblies to get loaded in a way that this problem surfaces.</p> <p align=left> </p> <p align=left>Looking at the source code for PowerCommands, we see a Reference to System.Core.dll.  Attaching a debugger to the VS2008 IDE, we see the following being logged just before the crash:</p> <p align=left> </p> <p align=left><font face=Courier>CLR: (C:\Windows\assembly\GAC_MSIL\Microsoft.VisualStudio.Tools.Office.Runtime.v9.0\9.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.Tools.Office.Runtime.v9.0.dll) Rejecting native image because dependency C:\Windows\assembly\GAC_MSIL\System.Core\3.5.0.0__b77a5c561934e089\System.Core.dll is not native</font></p> <p align=left> </p> <p align=left>This is supposed to be fixed for the next version of the CLR.</p> <p align=left> </p> <p align=left> </p> <p align=left><strong>Workaround:</strong></p> <p align=left>Delete the native image generated for VSTO.  To do this, open a command prompt, navigate to the directory below, and enter the text indicated below in that directory to initiate the deletion.  This removes the <em>Native Image Cache</em> of the VSTO DLL.  It does not delete the VSTO DLL.</p> <p align=left> </p> <p align=left>C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727&gt;ngen /delete Microsoft.VisualStudio.Tools.Office.Runtime.v9.0</p> <p> </p> <p align=left>The main copy of the VSTO DLL will remain untouched, so no functionality is lost, there may be a small performance penalty.  Neither the engineer nor I noticed a performance hit.</p> <p align=left> </p> <p align=left>To re-install the VSTO DLL  into the cache, run the NGEN command on the DLL. For example, here is the command to re-install.  Note, you need to be in the same folder as the DLL.<br></p> <p align=left> </p> <p align=left>ngen  Microsoft.VisualStudio.Tools.Office.Runtime.v9.0.dll</p> <p> </p> <p align=left> </p> <p align=left><strong>Two Known Fixes:</strong></p> <p align=left>So if you are experiencing this issue, there are basically 2 ways to handle it at this time:</p> <p align=left>1. Uninstall PowerCommands.</p> <p align=left>- OR -</p> <p align=left>2. Remove the native image cache of the VSTO DLL (per the workaround instructions).</p> <p align=left> </p> <p align=left>Again, this should be fixed in the next version of the CLR.</p>Mon, 16 Jun 2008 12:57:52 Z2008-06-16T12:58:01Zhttp://social.msdn.microsoft.com/Forums/en-US/vsto/thread/99e124d0-c5d7-49c0-b1dd-71328f9a6571#7cf14afc-9fd2-40a7-a744-08eab91f4038http://social.msdn.microsoft.com/Forums/en-US/vsto/thread/99e124d0-c5d7-49c0-b1dd-71328f9a6571#7cf14afc-9fd2-40a7-a744-08eab91f4038K.Zambovhttp://social.msdn.microsoft.com/Profile/en-US/?user=K.ZambovVS 2008 closes at build, Outlook 2007 Add-In I was struggling with the same problem that Ken explained in his postings. I am currently trying to repair visual studio 2008 in order to fix it. I only have the problem with Outlook Add-in. Excell worked OK.<br><br>One other thing that is happening is that my Outlook Add-in project sometimes works for some reason. For example I tried to repair VS 2008 yesterday but I never finished the repair, so the changes were rolled back. I was able to build my Outlook Add-in project right after this. This morning however I have the same problem like  yesterday.<br><br>The other surprising thing was that the project was working fine for about a month before it started acting that way. I haven't installed anything to VS 2008 and my last .NET framework update was dated in mid-September. I have built the project many times since then.<br><br>Finally, I don't have PowerCommands installed....HELP!<br><br>P.S. My VS 2008 finished repair, and the problem is still there....Thu, 23 Oct 2008 12:58:33 Z2008-10-23T12:58:33Zhttp://social.msdn.microsoft.com/Forums/en-US/vsto/thread/99e124d0-c5d7-49c0-b1dd-71328f9a6571#e45e09c9-854f-408f-a7f5-9969b8b06df7http://social.msdn.microsoft.com/Forums/en-US/vsto/thread/99e124d0-c5d7-49c0-b1dd-71328f9a6571#e45e09c9-854f-408f-a7f5-9969b8b06df7a_jandrewhttp://social.msdn.microsoft.com/Profile/en-US/?user=a_jandrewVS 2008 closes at build, Outlook 2007 Add-In<p>I am still trying to resolve this situation also. I also dont have PowerCommands installed, I have just removed the native VASTO cache (as stated from Microsoft Eng above) and still have the same issue.<br><br>has anyone resolved this yet?</p>Fri, 07 Nov 2008 09:13:26 Z2008-11-07T09:13:26Zhttp://social.msdn.microsoft.com/Forums/en-US/vsto/thread/99e124d0-c5d7-49c0-b1dd-71328f9a6571#f0a906b6-fbd5-4b35-b71f-bf0656385ad3http://social.msdn.microsoft.com/Forums/en-US/vsto/thread/99e124d0-c5d7-49c0-b1dd-71328f9a6571#f0a906b6-fbd5-4b35-b71f-bf0656385ad3KristoferA - Huagati Systemshttp://social.msdn.microsoft.com/Profile/en-US/?user=KristoferA%20-%20Huagati%20SystemsVS 2008 closes at build, Outlook 2007 Add-In<div class=quote><font class=quoteHeader>KenPalmer said:</font> <p align=left>Again, this should be fixed in the next version of the CLR.</p> <p></p></div><br><br><br>Will this fix be part of .net 3.5 SP1 GDR 1? <hr class=sig> KrisTue, 18 Nov 2008 03:32:50 Z2008-11-19T11:57:05Z