Assembly.Location Property

 

Gets the full path or UNC location of the loaded file that contains the manifest.

Namespace:   System.Reflection
Assembly:  mscorlib (in mscorlib.dll)

abstract Location : string with get
override Location : string with get

Property Value

Type: System.String

The location of the loaded file that contains the manifest. If the loaded file was shadow-copied, the location is that of the file after being shadow-copied. If the assembly is loaded from a byte array, such as when using the Load(Byte[]) method overload, the value returned is an empty string ("").

Exception Condition
NotSupportedException

The current assembly is a dynamic assembly, represented by an AssemblyBuilder object.

To get the location before the file has been shadow-copied, use the CodeBase property.

The following example displays the location of the loaded file that contains the manifest.

No code example is currently available or this language may not be supported.

FileIOPermission

for access to the path. Associated enumeration: FileIOPermissionAccess.PathDiscovery

.NET Framework
Available since 1.1
Silverlight
Available since 2.0
Return to top
Show: