User profile assembly cache .NET add-ins

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

User profile assembly cache .NET add-ins
 
Joost Verdaasdonk




Posts: 41
Joined: 2007-05-25
Hi,

We have problems deploying our .NET Word add-in.

When the program is installed and used an Assembly cache is maintained.
This Cache is in:
C:\Documents and Settings\<logged on user>\Local Settings\Application Data\assembly\dl2

When you uninstall the program this cache is still there.

So after you install a new version of your program you always have to clear out this cache manualy or otherwise you'll still have the old (cached) dll's running in your application. Which leads to all sorts of unwanted behaviour.

Do more people experience this troublesome behaviour? And if so does anyone know of a good way to deal with this assembly cache?

Thanks
Regards,
ManualMaster Development
Posted 28 Jun, 2007 04:49:45 Top
Sergey Grischenko


Add-in Express team


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

Do you change the AssemblyVersion attribute of the add-in assembly before you publish a new version of your software?


P.S. We always do our best to answer your forum requests as soon as possible. However, we apply the rule "first in first out" with Premium Support Service subscribers taking priority. Please understand it may take us some time to do research on the issue. Please be assured we will let you know as soon as the best possible solution is found.
Posted 28 Jun, 2007 10:35:08 Top
Joost Verdaasdonk




Posts: 41
Joined: 2007-05-25
Hi Sergey,

Thank you for your answer.

Yep all assemblies get a new version number every time we release a minor or major version. (basicly everytime we build new installers)

And yes a higher version will cause the desired effect in most scenarios. But there have been many times the old cache from the user was loaded.

Only a full delete of the cache gives us a reliable effect.

I'm thinking of rebuilding my setup project with Wise because that installer would give me a way of clearing those directories before installing my new version. But if there are other options I'd rather keep my integrated setup in de .NET IDE.

I'm open for any new ideas to explore. :)
Regards,
ManualMaster Development
Posted 28 Jun, 2007 14:15:20 Top
Sergey Grischenko


Add-in Express team


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

Please set the 'shadowCopyEnabled' attribute to false in the adxloader.dll.manifest file. You need to clean the cache before the changes will have affect.
Posted 29 Jun, 2007 13:39:29 Top
Joost Verdaasdonk




Posts: 41
Joined: 2007-05-25
Hi Sergey,

'shadowCopyEnabled'? Does this mean the assembly cache is generated by the adxloader? Didn't know that... :)

I'll do some test with it to see it doesn't comprimise application speed too much.

As always thank you for your insights!
Regards,
ManualMaster Development
Posted 02 Jul, 2007 17:50:44 Top
Sergey Grischenko


Add-in Express team


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

The assembly cache is a .NET Framework feature. But it can be disabled for an application that is loaded in a separate domain.
Posted 03 Jul, 2007 14:31:50 Top
Joost Verdaasdonk




Posts: 41
Joined: 2007-05-25
Hi Sergey,

Ah ok all is clear now. Thanks for sharing.
Regards,
ManualMaster Development
Posted 04 Jul, 2007 06:09:05 Top
Joost Verdaasdonk




Posts: 41
Joined: 2007-05-25
Hi Joost.

Please set the 'shadowCopyEnabled' attribute to false in the adxloader.dll.manifest file. You need to clean the cache before the changes will have affect.


Hi Sergey,

Some time has past on this topic but finally found the time to do some tests.

I've changed the manifest to:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<assemblyIdentity name="MMWordAddin, PublicKeyToken=3837c808476bdea6" />
<loaderSettings generateLogFile="true" shadowCopyEnabled="false" />
</configuration>

Then I manually delete the shadow copy assemblies.

Then I restart my app... The Shadow copy still get's build?

Do you have any ideas on this?

Another question on the matter.

Would it be possible to rebuild the Shadow copy assemblies by use of some .NET class? Perhaps in a separate executable I can distribute with my app?

I think this is done in the AppDomainSetup Class but I'm still looking for the right methods.

I've been looking for a method that clears the Shadow Copy but there doesn't seem to be one.

Thank you for your thoughts.
Regards,
ManualMaster Development
Posted 09 Aug, 2007 08:40:38 Top
Joost Verdaasdonk




Posts: 41
Joined: 2007-05-25
Hi,

Does anyone have an idea for the above question
Regards,
ManualMaster Development
Posted 14 Aug, 2007 10:39:35 Top
Sergey Grischenko


Add-in Express team


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

Then I restart my app... The Shadow copy still get's build?

I fixed this bug in the latest version of Add-in Express. What version of Add-in Express do you use?
I suppose you copy the latest version of adxloader.dll after you install a new Add-in Express version.

Would it be possible to rebuild the Shadow copy assemblies by use of some .NET class? Perhaps in a separate executable I can distribute with my app?

What do you mean?

P.S. We always do our best to answer your forum requests as soon as possible. However, we apply the rule "first in first out" with Premium Support Service subscribers taking priority. Please understand it may take us some time to do research on the issue. Please be assured we will let you know as soon as the best possible solution is found.
Posted 17 Aug, 2007 18:58:25 Top