Addin deployment problems

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

Addin deployment problems
 
Thanasis Boukouvalas




Posts: 40
Joined: 2006-06-17
Hi

I have an addin that collaborate with our CRM application (.NET 1.1) and works fine in my machine but when I install it in other machines, does not works as it should.

Build environment:

  • Windows XP SP2
  • Office 2003 SP2
  • Both VS 2003 and 2005 coexist. Build with VS 2003
  • Host configuration for 1.1.4322


This addin in my machine loads referenced .NET framework assemblies from ver 1.1 (as it should to)
But when I install it in other two machines (with both 1.1 and 2.0 .NET installed per machine) this same addin loads .NET 2.0 !!!

The Setup project was created from ADX 2.5 wizard (with no shim and Office XP interops for backwards compatibility) and now I have ADX 2.7 with this "old" setup.

In all 3 machines I use the same setup but only in my machine works fine (loading .NET 1.1 as our CRM needs).

I've tried ADXLoader (hoping to solve the above problem) but then I have a much bigger problem: Outlook shadow copies my addin dll and I cannot then load our CRM assemblies.
My addin has to run from our CRM application folder (that's where I install the addin).

This problem is much bigger than the Office Xp compatibility issue I mentioned in another topic and I really cannot find a way to deploy my addin even for Office 2003.

Please help.
Posted 12 Oct, 2006 10:42:21 Top
Sergey Grischenko


Add-in Express team


Posts: 7230
Joined: 2004-07-05
Hi Thanasis.

It is normal that the host application loads the latest version of the .NET Framework. Anyway the add-in should work properly.
Have you read the ADX deployment guide yet?
If no, please download the document below to check the setup project:
http://www.add-in-express.com/projects/deploymentguide.zip

I've tried ADXLoader (hoping to solve the above problem) but then I have a much bigger problem: Outlook shadow copies my addin dll and I cannot then load our CRM assemblies.

Did you try to use the Codebase property of the Assembly class to get the add-in installation folder?
Posted 12 Oct, 2006 15:28:41 Top
Thanasis Boukouvalas




Posts: 40
Joined: 2006-06-17
Hi Sergey

According to you, I cannot explain why on my machine (with .NET 1.1 and 2.0) .NET 1.1 is prefered and on the other two machines (with .NET 1.1 and 2.0 too) .NET 2.0 is prefered. (All three machines have Office 2003 SP2)

What is the purpose of Host configuration then?
Posted 13 Oct, 2006 02:48:31 Top
Sergey Grischenko


Add-in Express team


Posts: 7230
Joined: 2004-07-05
Hi Thanasis.

The 'Host configuration' dialog works on the development PC only.
It adds the following configuration file to the installation folder of the host application.
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v1.1.4322"/>
</startup>
</configuration>

That is why your add-in uses the .NET v1.1 on the development PC and on the deployment one it loads the .NET v2.0.
Posted 13 Oct, 2006 09:06:15 Top
Thanasis Boukouvalas




Posts: 40
Joined: 2006-06-17
Thank you Sergey for your clarification about the purpose of Host configuration.
There was a misunderstanding from me. I thought that Host configuration was an Installer directive in order to enforce Outlook to use a specific runtime .Net version.

My addin communicates with the CRM application server (.NET 1.1) through .NET remoting that has some problems when the client uses .NET 2.0 and server uses .NET 1.1 due to some serialization bugs which are partly be solved till now with Microsoft hot fixes and thats the reason I HAVE TO enforce my addin to use .NET 1.1 and cannot wait for the next .NET SP.

Of course I can use supportedRuntime of Outlook.exe.config but Im afraid that maybe Ill meet other addins in our customers Outlook that need .NET 2.0.
Do you know if somehow can I enforce only my addin to use .NET 1.1?

The second issue about the difference of ADX Installer and ADX Loader is that the Loader causes shadow copy of my addin and any CRM assembly I use. So, maybe >300 assemblies will be shadow copied too. Besides whenever a newer version of CRM application will be installed, the addin will continue to use the older shadow copies of CRM assemblies and well have a DLL hell.

Can I use the ADX installer (instead of ADX loader) or may be obsolete by ADX in the future?
Or, alternatively can I use the newer ADX loader with a somewhat directive to prevent shadow copy and simulate the behavior of ADX installer?

PS
Id like to make a small setup with only my addin assembly and not any other CRM assemblies used by addin in order to someone optionally install the addin in the folder of CRM application client.

Thank you in advance.
Any help would be appreciated.
Posted 15 Oct, 2006 06:08:44 Top
Sergey Grischenko


Add-in Express team


Posts: 7230
Joined: 2004-07-05
Hi Thanasis.

Do you know if somehow can I enforce only my addin to use .NET 1.1?

Yes, it is possible. You just need to use the C++ shim created by the ADX wizard. However other add-ins written for .NET v2.0 will not work in any case because it is not possible to initialize both .NET Frameworks within one process of the host application. I think you need to update the server or just wait for hot fixes from Microsoft.

Can I use the ADX installer (instead of ADX loader) or may be obsolete by ADX in the future?

Of course, you can use the ADX installer. We are going to support it in the future as well as the ADX loader.

Or, alternatively can I use the newer ADX loader with a somewhat directive to prevent shadow copy and simulate the behavior of ADX installer?

Now it is not possible with the ADX loader. However you can delete the calls of the put_ShadowCopyDirectories and put_ShadowCopyFiles methods in the CreateLocalAppDomain method of the shim project to prevent the shadow copy. Of course, you will need to add the C++ shim to the add-in solution instead of the ADX loader.

PS
Id like to make a small setup with only my addin assembly and not any other CRM assemblies used by addin in order to someone optionally install the addin in the folder of CRM application client.

I would suggest you to install all CRM assemblies to the GAC. I think the shadow copy issue will disappear in this case.


Posted 16 Oct, 2006 09:27:17 Top