Addins no longer work with .NET 2.0 Redistributable Installed

Add-in Express™ Support Service
That's what is more important than anything else

Addins no longer work with .NET 2.0 Redistributable Installed
ADX addins developed with VS2003 won't load on machines with .NET 2.0 
Ryan Farley


Guest


I have several addins I developed with VS 2003 that have been working great. However, these addins no longer load on machines that have installed the new .NET 2.0 Redistributable.

To be clear, I'm not looking to develop my addins with .NET 2.0, I just need them to continue to work on machines with .NET 2.0 installed.

The problem happens not only with my own addins, but also with the test/demo addins downloaded from this site (like the ADX Toys demo addin). I got an error each time I attempted to start outlook after installing .NET 2.0 on the machine (indicating that my addin failed to load). If I go to the COM Add-ins dialog to load them, I get no error but they do not load (and I go back to the dialog to see that they are still unchecked).

Any ideas? Thanks.

-Ryan
Posted 01 Nov, 2005 13:07:31 Top
Sergey Grischenko


Add-in Express team


Posts: 7233
Joined: 2004-07-05
Hi Ryan.

The fact is that COM add-ins written under .NET Framework v.1.x don't work on PCs where .NET v.2.0 is installed.
You can learn more about this issue using the link below:
http://msdn.microsoft.com/netframework/default.aspx?pull=/library/en-us/dnnetdep/html/netfxcompat.asp
See the "Side-by-Side Runtime Behavior of Applications on the .NET Framework 1.0, 1.1, 2.0" title.

However this problem can be solved. To force Outlook to load .NET assemblies compiled for .NET Framework v.1.1 you just need to create the config file called outlook.exe.config in the Office installation folder.
Then add the following information to the config file:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v1.1.4322"/>
<supportedRuntime version="v1.0.3705"/>
</startup>
</configuration>
Posted 01 Nov, 2005 14:46:47 Top
Sergey Grischenko


Add-in Express team


Posts: 7233
Joined: 2004-07-05
Posted 01 Nov, 2005 14:52:42 Top
Ryan Farley


Guest


All of my other .NET 1.1 outlook addins (not built with ADX) continue to work fine with .NET 2.0 installed. The *only* .NET addins that do not work after installing .NET 2.0 are the ones using ADX.

These are for addins used by many different companies. I don't believe that telling them to add a supportedruntime in a config file for Outlook is going to go over well. What happens when one of those companies also want to use an addin built on .NET 2.0?

I did read the link(s) provided, but I do have other .NET 1.1 addins not built on ADX that load without issue.

-Ryan
Posted 01 Nov, 2005 14:58:37 Top
Ryan Farley


Guest


BTW, I did try what you suggested

To force Outlook to load .NET assemblies compiled for .NET Framework v.1.1 you just need to create the config file called outlook.exe.config in the Office installation folder


Didn't seem to change things, I still could not get it to load (tested with mine and also the ADX Toys addin)

Thanks.
-Ryan
Posted 01 Nov, 2005 15:04:00 Top
Sergey Grischenko


Add-in Express team


Posts: 7233
Joined: 2004-07-05
It is very strange. I have just tested ADX Toys for Outlook (I use Outlook 2003) and it works fine when I put the outlook.exe.config in the Office folder and vice versa.

I did read the link(s) provided, but I do have other .NET 1.1 addins not built on ADX that load without issue.

Are you sure that these add-ins are COM Add-ins? E.g. it can be Exchange Extensions add-ins. I tested the Shared Add-in Wizard of VS and I got the same issue. I am sure the problem is not in the ADX code.

I would advice you to have two version of your add-in. One is written for .NET v.1.1 and one for v.2.0.
Posted 01 Nov, 2005 15:57:02 Top
Ryan Farley


Guest


Here are some public Outlook addin's (not mine) written with .NET 1.1 that still load OK after installing .NET 2.0:

http://www.daveswebsite.com/software/packagetracker/default.shtml

http://www.microsoft.com/downloads/details.aspx?FamilyId=87C661E3-178D-46F0-979E-0FDD96327928&displaylang=en

I had both of those addins installed prior to installing .NET 2.0 and they still worked after.

As far as adding the config for Outlook to force supported runtimes, I place the config file (with the content you mentioned), named "outlook.exe.config", in the folder where the OUTLOOK.EXE resides (C:\Program Files\Microsoft Office\OFFICE11), then closed Outlook (made sure nothing remained loaded in task manager) and then started back up and tried to load the addin with no luck. Am I missing anything from what you tried?

Thanks for your help,
-Ryan
Posted 01 Nov, 2005 16:23:37 Top
Roland Smeets




Posts: 12
Joined: 2005-10-07
Hi,

This solution does work:

Sergey Grischenko wrote:
<?xml version="1.0" encoding="utf-8"?> <configuration> <startup> <supportedRuntime version="v1.1.4322"/> <supportedRuntime version="v1.0.3705"/> </startup> </configuration>


But this is not a solution on client systems.

The strange part is that even calling the "Installer" causes the outlook and project application to fire an unhandled error. This would suggest that the error occurs before even launching the add in itself.

On debugging, the "Sub New" for the add-in is never called.

Looking forward to a solution for the problem.


Regards,



Roland.
Posted 02 Nov, 2005 05:40:07 Top
Sergey Grischenko


Add-in Express team


Posts: 7233
Joined: 2004-07-05
Hi Roland.

I think the most correct solution for client systems is to have two versions of the add-in (for .NET v.1.1 and v.2.0). As for the add-ins which Ryan has mentioned about, I will test it out and will reply soon.
Posted 02 Nov, 2005 05:52:59 Top
Roland Smeets




Posts: 12
Joined: 2005-10-07
Hi Sergey,

The add-ins I have a still developed on .NET 1.1, but after installation of Visual Studio 2005 (alongside installation with 2003) and the subsequent installation of the .NET Framework 2.0. The add-ins are not started (or generate an application error) for the Project, Powerpoint and Outlook applications. The Word and Excel versions just work fine.

This leads to the conclusion that the .NET Framework 2.0 messes up the existing add-ins (they where not recompiled or anything).

Although I should mention that I am using your beta version for the extra events it exposes.

Anyway looking forward to the solution.
Posted 02 Nov, 2005 07:57:47 Top