Given a class library DLL that can be installed on the GAC (production) or not (development), I need to know whether the executing assembly is running from the GAC or not. How can I know this?
Did you try checking the Assembly.GlobalAssemblyCache
property?
bool loadedFromGac = this.GetType().Assembly.GlobalAssemblyCache;
...or:
bool loadedFromGac = Assembly.GetExecutingAssembly().GlobalAssemblyCache;