Summary
Determines whether an assembly is installed in the Global
Assembly Cache given its file name or path.
- Assembly
- NAnt
.Core .dll - Namespace
- NAnt
.Core .Util - Containing Type
- GacCache
Syntax
public bool IsAssemblyInGac(string assemblyFile)
Remarks
To determine whether the specified assembly is installed in the
Global Assembly Cache, the assembly is loaded into a separate
System.AppDomain
.
If the family of the current runtime framework does not match the
family of the current target framework, this method will return
false
for all assemblies as there's no way to
determine whether a given assembly is in the Global Assembly Cache
for another framework family than the family of the current runtime
framework.
Parameters
Name | Type | Description |
---|---|---|
assemblyFile | string | The name or path of the file that contains the manifest of the assembly. |
Return Value
Type | Description |
---|---|
bool |
true if assemblyFile is
installed in the Global Assembly Cache; otherwise,
false .
|