VS 2008 closes at build, Outlook 2007 Add-In

K

KenPalmer

Visual Studio 2008 abruptly closes when I try to build an Outlook 2007 Add In.

My workstation is configured as follows:
* Windows XP Professional
* Outlook 2007 SP1
* Visual Studio Team System 2008 Development Edition
* Microsoft .Net Framework 3.5

Originally I thought this was a code problem in my add-in, or that perhaps
my PC needed to be rebooted. This morning I powered off and rebooted. Here
are the steps to replicate my problem. Additionally, I read that Outlook
needed to be closed before building an add-in. I also tried that, but it
still did not work.

I suspect that this may be related to the registry settings that VS 2008
attempts to make when it builds an Add-In. Here is an excerpt from
Professional C# 2008 that lead me to this hypothesis.

Managing Application-Level Add-Ins
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. This means that registry entries are added so
that when the Office application starts, it will automatically locate and
load your assembly. If you subsequently want to add or remove add-ins, then
you must either navigate through Office application settings or manipulate
the registry manually.

Steps to replicate my problem.
1. Boot computer and do not open Outlook.
2. Open VS 2008
3. Select File > New Project > Visual C# > Office > 2007 > Outlook 2007
Add-In.
4. Choose the default name and then OK.
5. Select Build > Build OutlookAddIn1.

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.

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:"C:\Program Files\Microsoft Visual Studio 9

After that Visual Studio 2008 abruptly closes.

This problem also occurs if VB.Net is selected in Step 3. And it occurs if
Outlook 2007 is opened before opening VS 2008.

Some relevant project properties are below (Project > OutlookAddIn1
Properties). If you need something else from this let me know and I can
respond.
Target Framework: .NET Framework 3.5
Build Config: Active (Debug)
Platform: Active (Any CPU)
Define DEBUG Constant: Checked
Define TRACE Constant: Checked
Warning Level: 4
Treat warnings as errors: None
Output Path: bin\Debug\
Generate serialization assembly: Auto

Perhaps there is something else I need to install in VS, like a patch or
plug in.

Thanks for your help.
 
K

Ken Slovak - [MVP - Outlook]

I think a VS support forum would be more likely to be able to help with a
problem like this.

Have you tried the VS Detect and Repair?
 
K

KenPalmer

Ken,
I have not tried Detect and Repair. I assume that would be available via
Control Panel > Add Remove Programs > Change/Remove to launch the wizard.
I'll give that a shot.

My other projects build with no problem, so that's why I thought to post the
problem on this forum.

Are you able to replicate the problem on your PC?

If the above does not work, I will open an incident ticket with Microsoft.
 
K

Ken Slovak - [MVP - Outlook]

No, I have no problems with addins in VS 2008 on any of my setups.
 
K

KenPalmer

Uninstalling Power Commands corrected the problem.

Here are steps to replicate the problem with Power Commands from the system
setup indicated at the top of this thread.

1. Install Visual Studio 2008 Power Commands.
2. Open Visual Studio 2008
3. Select File > New Project > Visual C# > Office > 2007 > Outlook 2007
Add-In.
4. Choose the default name and then OK.
5. Select Build > Build OutlookAddIn1.

The Output dialog will open, display a line, and then Visual Studio will
abruptly close.

6. Now close Visual Studio
7. Uninstall Power Commands
8. Open Visual Studio
9. Follow steps 2 through 5.

The Outlook Add-In project will build successfully.

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.
 
K

Kalin Zambov

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.
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.
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.
Finally, I don't have PowerCommands installed....HELP!
 
K

Ken Slovak - [MVP - Outlook]

I explain a lot of things, care to tell us what your actual problem is?
 
K

Kalin Zambov

I was actually able to find what was causing the problems. A lot of other postings mentioned that PowerCommands can cause such issue due to interference with the Common Language RunTime. I don't have PowerCommands installed, but I had another add-in called DXCore for Visual Studio.NET. This was the application that was causing VS 2008 to crash at build. This add-in consists of 2 applications - CodeRush for Visual Studio.NET and !Refactor for Visual Studio.NET. I had !Refactor uninstalled previously but I wasn't aware that DXCore is still there. After removing this one as well everything started working like it should.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top