views:

63

answers:

1

Entity Framework references some DLLs. On one system, they showed up in the GAC which is very convenient. I can't figure out how I did this. The installer doesn't seem to do this --

The dlls I'm specifically talking about here are:

  • The core library assembly Microsoft.Practices.EnterpriseLibrary.Common.dll
  • The Unity Application Block assembly Microsoft.Practices.Unity.dll
  • The Object Builder assembly Microsoft.Practices.ObjectBuilder2.dll

but I guess it applies to any dll one might want to add to the GAC. Also is there a way to check on program startup whether an assembly even is in the GAC?

+1  A: 

Check if is in the GAC:

bool inGac = System.Reflection.Assembly.Load(assemblyName).GlobalAssemblyGac;

To install in gac, there's a question http://stackoverflow.com/questions/1460793/methods-to-programmatically-install-a-net-assembly-into-the-gac

onof