Given a class library library that can be installed on the GAC (production) or not (development), I need to know if the executable build is from the GAC or not. How can I know this?
Have you tried checking the property Assembly.GlobalAssemblyCache?
Assembly.GlobalAssemblyCache
bool loadedFromGac = this.GetType().Assembly.GlobalAssemblyCache;
... or:
bool loadedFromGac = Assembly.GetExecutingAssembly().GlobalAssemblyCache;
Use the AssembyInfo class to find out the loaded assemblies for your application. The returned Assembly objects have a GlobalAssemblyCache property that indicates what you need.
Build MSDN Documents
- , Fusion Log Viewer (fuslogvw.exe). Visual Studio ( Visual Studio Windows, ), Fusion Log Viewer , .
, , .. . , - , DLL .
Microsoft: https://msdn.microsoft.com/en-us/library/e74a18c4(v=vs.110).aspx
Source: https://habr.com/ru/post/1712864/More articles:Is there a Java API or built-in function to solve annuity problems? - javaCreating hidden processes (the window is not visible) - cDoes anyone know the average response time for an HL7 clinical message? - hl7PopupMenu in Gtk # - c #Check if Spring Scope is active - scopeWhy does Textpad ask if you want to use POSIX regex syntax? - windowsWiX installer and user actions - c #How to get current date and time in Yahoo Pipes? - datetimeHow to get reverse regular expression? - regexAliases (WPF) - resourcesAll Articles