Hi all,
I've created an Outlook Addin using VSTO with VS2005 beta 2 (Whidbey).
I've noticed that the Addin is registered after a successful build without me having to do anything.
Is there anyway to disable this behaviour
I work with a team of developers and I don't want the Outlook Addin to be registered on everyone's machine after he or she does a build.
In addition I'm trying to use the build events to copy the built files to a location other than the target folder and register the addin from the new location, does anyone know how to do this I've tried using Publish, but it doesn't quite achieve what I want.
Rik

VSTO Outlook Addin - How to disable registration after build
SW Skeen
There is no easy way to disable registration of Outlook addins when they are built.
You may be aware that the .csproj or .vbproj file that is your Outlook addin project, is actually an XML file. The file contains all the information needed for MSBuild or VS to compile your project.
I played around with C# Outlook Addin project file (I am just back from a long vacation and don't feel like working :-)). And it seems like you can "negate" the addin registration by editing the begining of the project file.
1. Open the .csproj file in notepad E.g. OutlookAddin1.csproj
2. The C# project file should begin with following XML node:
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3. Change the 'DefaultTargets' attribute's value as follows:
<Project DefaultTargets="Build; UnRegisterOfficeAddin" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
4. Save the file.
5. Open the project in VS and build solution. The registry is not be modified now.
WARNING! This is just a hack. It seems to work for me. Use at your own risk.
Jonathon H.
Did you resolve this issue Just curious as there has been no activity in this thread since 11/23/05. If I don't hear from you within a week, I'll just consider the matter closed.
Thanks!
Mike Hernandez
Community Program Manager
VSTO Team
zenix
At the moment I'm working on a custom built console application that updates the registry as required. The console application is called as part of the Post Build event of the Addin.
It's not ideal, but it appears to be working. If anyones interested, I can post the code somewhere.
By the way, I'd still be interested to know if disabling the Addin registration is possible via project or solution settings.
Rik