Export (0) Print
Expand All

IVsaReferenceItem.AssemblyName Property

Gets or sets the name of the referenced assembly.

[Visual Basic]
Property AssemblyName As String
[C#]
string AssemblyName {get; set;}
[C++]
__property String* get_AssemblyName();
__property void set_AssemblyName(String*);
[JScript]
function get AssemblyName() : String;function set AssemblyName(String);

Property Value

Returns the string literal name of the referenced assembly.

Remarks

All assemblies that are referenced by a project, but that are not part of the Microsoft .NET Framework, must be placed in the Application Base directory. You can reference the Application Base directory by setting the ApplicationBase property using the IVsaEngine.SetOption method.

Note   Only Visual Basic .NET uses the ApplicationBase property. JScript .NET can take the full path name to the assembly for its AssemblyName property. In both cases, however, the AssemblyName value is only used at compile time. At runtime, the .NET Framework loader (Fusion) searches for assemblies in a specific order, as described in How the Runtime Locates Assemblies. For more information about how the runtime uses file paths, see System.AppDomainSetup.

In addition to the errors noted below, the AssemblyExpected exception may be thrown when the IVsaEngine.Compile method is called if the AssemblyName property does not refer to a valid assembly.

The default value is the empty string ("""").

Because references require access to the file system in order to load the assembly DLL, Permission.FileIOPermission is required to access this property.

The following table shows the exceptions that the AssemblyName property can throw.

Exception Type Condition
EngineClosed The IVsaEngine.Close method has been called and the engine is closed.
EngineRunning The engine is running.
EngineBusy The engine is currently servicing requests on another thread.
AssemblyNameInvalid The assembly name is not valid.

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

IVsaReferenceItem Interface | IVsaReferenceItem Members | Microsoft.Vsa Namespace | How the Runtime Locates Assemblies | IVsaEngine.SetOption | Compile | System.AppDomainSetup

Show:
© 2014 Microsoft