This documentation is archived and is not being maintained.

IVsaEngine.Site Property

Sets or gets the host-implemented IVsaSite object that is used by the script engine to communicate with the host.

[Visual Basic]
Property Site As IVsaSite
IVsaSite Site {get; set;}
__property IVsaSite* get_Site();
__property void set_Site(IVsaSite*);
function get Site() : IVsaSite;function set Site(IVsaSite);

Property Value

Returns a reference to the current IVsaSite object.


Once the Site property has been set, it cannot be changed. Any attempt to set the Site property when the existing property value is non- a null reference (Nothing in Visual Basic) results in an exception, and the existing value is retained.

By default, the initial value of the Site property is a null reference. However, after setting the root moniker, the Site property must be set to reference a valid IVsaSite object before the following methods on the IVsaEngine interface can be called: Compile, Run, or InitNew.

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

Exception Type Condition
EngineClosed The IVsaEngine.Close method has been called and the engine is closed.
EngineBusy The engine is currently executing code for another thread.
RootMonikerNotSet The IVsaEngine.RootMoniker property has not been set.
SiteAlreadySet The Site property cannot be set because it has already been set.
SiteInvalid The Site property is set to an invalid value.


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

IVsaEngine Interface | IVsaEngine Members | Microsoft.Vsa Namespace | IVsaSite