Export (0) Print
Expand All

IVsaEngine.GetOption Method

Gets implementation-specific options for a script engine.

[Visual Basic]
Function GetOption( _
   ByVal name As String _
) As Object
[C#]
object GetOption(
   string name
);
[C++]
Object* GetOption(
   String* name
);
[JScript]
function GetOption(
   name : String
) : Object;

Parameters

name
The name of the option to get.

Return Value

Returns the value of the option.

Remarks

An example of such an implementation-specific option would be compiler-specific switches passed in to the script engine, for example, to turn warnings into exceptions.

The following table shows available options for the JScript .NET script engine. The table lists all JScript compiler options, even those that are not supported by Script for the .NET Framework runtime scenarios. The latter are marked with an asterisk (*). While these options are available from the command line in the JScript compiler, the Script for the .NET Framework runtime scenarios do not provide access to them.

Option Type Description
AlwaysGenerateIL Boolean

Get/Set

Setting to true enables error-recovery. JScript .NET will attempt to build an assembly that runs, even if there are compiler errors.
CLSCompliant Boolean

Get/Set

Forces checks for compliance to the Common Language Specification (CLS).
DebugDirectory String

Get/Set

Specifies the directory to which JScript .NET will store source code items from which they can be loaded into a debugger. Used when the IVsaEngine.GenerateDebugInfo property is set to true.
Define Not applicable Ignored.
Defines Hashtable

Get/Set

Defines pre-processor values to define name-value pairs. Value must be numeric or Boolean constant.
EE* Boolean

Get/Set

Reserved for the debugger.
Fast Boolean

Get/Set

Enables fast mode.
LibPath* String

Get/Set

Specifies path to libraries. Multiple directories should be separated with Path.DirectorySeparatorChar.
ManagedResources ICollection

Get/Set

Specifies managed resources to embed into the assembly. Items in the collection must be Vsa.ResInfo objects.
Optimize Not applicable Ignored.
Output* String

Get/Set

Specifies the name of the output file.
PEFileKind* System.Reflection. Emit.PEFileKinds

Get/Set

Specifies the desired type of output (for example, EXE, DLL, WinEXE files).
Print Boolean

Get/Set

Enables the print function. Set ScriptStream.Out to an instance of Text Writer to receive the output.
UseContextRelativeStatics Boolean

Get/Set

Makes global variables context-relative, improving thread-safety at the expense of performance. Avoid global variables in multi-threaded environments.
Version* System.Version

Get/Set

Provides version information for the assembly.
VersionSafe Boolean

Get/Set

Forces user to write version-safe code.
WarnAsError Boolean

Get/Set

Directs compiler to treat warnings as errors.
WarningLevel Int

Get/Set

Specifies level of warnings to report, from 0 (errors) to 4 (least severe).
Win32Resource String

Get/Set

Specifies name of Win32 resource file to embed.

The following table lists available options for the Visual Basic .NET script engine.

Option Type Description
AppDomain String

Get/Set

Sets or retrieves the application domain in which a script engine executes compiled code when it calls the IVsaEngine.Run method. The option enables you to specify the AppDomain in which the code will run, or to create a new AppDomain, if one is needed. To create a new AppDomain in which to run code, the host should pass a null reference (Nothing in Visual Basic) for the pDomain parameter.
ApplicationBase String

Get/Set

Sets or retrieves the ApplicationBase directory. All assemblies that are referenced by a project, but that are not part of the Microsoft .NET Framework, must be placed in the ApplicationBase directory.
ClientDebug Boolean

Get/Set

Specifies whether client debugging is enabled. Supported in the design-time engine only.
HostName String

Get/Set

Specifies the literal name of the host that is used in the IDE for the Return to <host> command.
TargetExe String

Get/Set

The path for the application that should be launched when the client debugging session is begun. The host can set this option if a new instance of the target application should be launched each time the debugging session is started.
TargetExeArguments String

Get/Set

Arguments that the host can pass to the application specified with the TargetEXE option. The host can use this property to pass command line arguments, if needed.
TargetPID Int (unsigned)

Get/Set

Specifies the process ID (PID) for the application to which the debugger should be attached. The host can use this property to attach the debugger to an application that is currently running, rather than launching a new instance of the target application. The host is responsible for determining the correct PID for the running instance of the application.
TargetExeStartupDirectory String

Get/Set

Specifies the startup directory for the application that is launched with a new debugging session is started.

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

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

Show:
© 2014 Microsoft