Shared Source CLI Managed Application Launcher

The Shared Source CLI (SSCLI) execution environment requires that managed applications be executed using the clix application launcher.  This tool loads the SSCLI execution environment which then loads the managed application and starts its execution from the initial entry point. The initial entry point is by default defined as a static method named Main in some class in the assembly.  If there are multiple static classes named Main, the entry point must be specified by using the /main:method option of the al.exe Assembly Linker or /main:type option of the C# compiler.

You must use clix.exe to execute applications under the SSCLI execution environment.  If you fail to use the clix launcher on Microsoft Windows® and simply execute the application name, the managed application might execute under the .NET Framework if it is installed.

The clix application will be in your path if you have used env.bat to set your SSCLI environment variables and you have successfully built the source tree.

Usage

clix managed_application [optional arguments to managed application]

The following table describes the options available.

Option Description
managed_application The file name of the managed application file you want to execute in the SSCLI execution environment.  The file name must fully specify the path to the managed application if the application is not in the current directory.

The application must be a managed executable file which has an initial execution entry point as defined by the /main:method option of the Assembly Linker or the /main:type option of the C# compiler.

The .exe extension is inferred if it is not directly specified.

If no extension is supplied and the filename does not exist exactly as specified, clix appends ".exe" (lowercase) to the name specified by managed_application and attempts to load a file with that name.

optional arguments to managed_application Arguments passed to the managed application.

The following table describes clix errors.

Error Description
Out of memory The application launcher failed to allocate sufficient memory.  The application might be too large to load into memory or there might be a configuration problem with the execution environment.
Invalid EXE file size The file size exceeds the file size limit of 4,294,967,295 ((DWORD)0xFFFFFFFF)
Invalid EXE format The specified managed application file is not an executable file. It is probably a text or other document or data file.
Invalid EXE signature The PE image header of the .exe file contains an invalid signature value.
EXE is not Managed The specified managed application file is not a managed executable file.  It is probably an unmanaged application or library.
Failed to load execution environment from filename.

Reason for error

The application launcher is unable to load the SSCLI execution environment.  Either the environment configuration or environment variables are incorrect or specific required files are missing.

For example, the full error

Failed to load execution environment from sscoree.dll. 
The specified module could not be found.
indicates that the critical Shared Source CLI file, sscoree.dll, could not be found.  Your build process might have failed to build the file, or the file might have been deleted or corrupted.  Build again and check closely for build errors.
Could not open file filename.

Reason for error

The specified managed application file, filename, could not be opened.  The reason for error text indicates the reason for the error.  For example, the reason
The system cannot find the file specified.

indicates that the file cannot be found at the specified location.

Could not find CorExeMain in the execution environment at filename.

Reason for error

The specified managed application file did not contain an execution entry point.  It is either a managed library assembly or an incorrectly linked managed application assembly.

Source Location

Source code for the clix.exe application launcher can be found by searching the SSCLI source tree for the clix directory.  The default location is sscli20\clr\src\tools\clix.


Copyright (c) 2006 Microsoft Corporation. All rights reserved.