Providers

Choose a provider from the list on the left or search for a specific provider. Choose a provider from the list or search for a specific provider.
Cmdlets  About Help
 
 

AssemblyCache

AssemblyCache

pscx.dll

Synopsis

PSCX Provider: Provides access to the .NET Global Assembly Cache and the assemblies it contains. The assemblies are exposed as AssemblyName objects.

Detailed Description

The AssemblyCache provider lets you enumerate all assemblies contained in the Global Assembly Cache (GAC). The GAC is a machine-wide store for shared, strongly-named assemblies that facilitates side-by-side execution.

Notes

The relationship between paths and AssemblyNames is one-to-many; e.g. on a machine that has both the 1.1 and 2.0 .NET Frameworks installed, peforming Get-Item "system.web" will return two AssemblyName objects.

Tasks

Getting to the Gac: drive

-------------------------- EXAMPLE 1 --------------------------
This command changes the current location to the Gac: drive. You can use this command from any drive in Windows PowerShell. To return to a file system drive, type the drive name, such as "set-location c:"

set-location gac:

Getting AssemblyName objects

-------------------------- EXAMPLE 1 --------------------------
This command gets the list of all assemblies in the GAC, each represented by a corresponding AssemblyName object. You can use this command from any Windows PowerShell drive.

get-item -path gac:

-------------------------- EXAMPLE 2 --------------------------
This command gets all versions of the "System.Web" assembly. You can use this command from any Windows PowerShell drive.

get-childitem -path gac:system.web

If you are in the Gac: drive, you can omit the drive name from the path.

-------------------------- EXAMPLE 3 --------------------------
This command gets a list of all assemblies beginning with Micros*. You can use this command from any Windows PowerShell drive.

get-childitem -path gac:Micros*

Loading assemblies from the returned AssemblyName objects

-------------------------- EXAMPLE 1 --------------------------
This shows how to load a number of related assemblies, isolated by version number and a common name stem.

get-childitem -path gac:microsoft.build* -version 2.0.0.0 | resolve-assembly -import

This will load all the MSBuild related assemblies for .NET 2.0 into the current AppDomain.