Show/Hide Toolbars

XSharp

Navigation: X# Documentation > The X# Runtime

XSharp.Macrocompiler

Scroll Prev Top Next More

This DLL is the X# "fast" macro compiler. The Macro compiler is written in C# and has a hardcoded dependency on XSharp.Core.

 
Please note that there is no link between XSharp.RT.DLL and XSharp.Macrocompiler.DLL. When you compile a macro then the runtime will try to locate the macro compiler with the method listed below.
You can override this mechanism by calling SetMacroCompiler() with the type of the class that implements the macro compiler. This type should implement the XSharp.IMacroCompiler interface. If you want to use the standard macro compiler then you need to add a reference to XSharp.MacroCompiler.dll and add the following code to the startup code of your application:

 

SetMacroCompiler(typeof(XSharp.Runtime.MacroCompiler))

 

If you don't do this then the runtime will try to locate the macro compiler in the following locations:

The directory where the XSharp.RT.DLL is loaded from

The directories in the path. If you use this then make sure that the assemblies listed below are in the same folder as XSharp.MacroCompiler.DLL

The Global Assembly Cache (GAC). If you use this mechanism then make sure that the assemblies listed below are also in the GAC.

 

This assembly depends on:

XSharp.Core.DLL

Note        

The XSharp installer adds the Macro compiler and the assemblies it depends on to the GAC so you will be able to run your apps without adding the macro compiler to the references list of your application. Please make sure you include the macro compiler in your installer when deploying your applications.