can't debug my outlook COM add-in VB.net

  • Thread starter Thread starter donald
  • Start date Start date
D

donald

i got a pc with VB.net and office 2003 and i am try to move it a cross
to a different pc so i move the code a cross and have install the com
add-in that all went ok. I build the code and that goes ok and then i
try to debug it and it open up outlook and then before it as finish
opening outlook 2003 up it. But if i open up outlook via start
programmes it open up with the COM add-in which work fine which is
good.

Then it turn out that it is in the disabled items which I don't know
why so I enable "Addin: dc dmcrm (mscoree.dll) and re debug it. So I
did that and it just open and close outlook right away with in like
2sec. so I Re debug it this time it come up with Outlook experienced a
serious error the last time the add-in 'dc-dmcrm' was opened. Would you
like to disable this add-in? To reactivate this add-in, click about MS
office Outlook on the help menu and then click Disabled Items?

I have try new project with Shared Add-in Extensibility Projects and
the same think happen so it is not my code.

Also i can debug it with the same code on the other PC!!!!

How can I over come this problem?

Any help Would relly appreciate it

donald
 
This will happen if you have both 1.x and 2.0 versions of the .NET Framework
installed on the machine. When Outlook loads the runtime by default it will
load the latest version (2.0). The problem is that VS2003 is now trying to
debug against the 2.0 CLR and it crashes. That causes Outlook to crash as
well and as far as it can tell your add-in is the problem so it offers to
disable it.

You can fix this by supplying Outlook with a config file that tells it what
version of the runtime it should load. Create a new file named
outlook.exe.config with this text (you could also specify the 1.0 CLR if
that's what you're targeting):
<configuration>

<startup>

<requiredRuntime version="v1.1.4322" safemode="true"/>

</startup>

</configuration>

Put the file in the same directory as Outlook.exe. The next time you try
debugging Outlook will know to load CLR v.1.1 and VS2003 won't freak out.
 
Back
Top