IncludeModule csharp ;
The CSharp module currently has no automatic detection of C# compilers available on the system. For that reason, the variable CSC_COMPILER is provided. CSC_COMPILER may be set to one of the following values before the CSharp module is loaded. It is advised to pass CSC_COMPILER to Jam from the command line.
mono - Use an available Mono compiler on the system. vs2005 - Use the .NET Framework 2.0. vs2008 (default) - Use the .NET Framework 3.5. For the given C# project TARGET, assign the DEFINES to the configuration THE_CONFIG.
| TARGET | The target to assign the DEFINES to. TARGET is optional if rule ActiveProject PROJECT has been specified. If TARGET is *, the defines are made available globally. | |
| DEFINES | The list of defines to apply. | |
| THE_CONFIG | (optional) If not specified, the default is all configurations. |
# Make #defines available for ABC and DEF=5 in csharpproject for all # configurations and all platforms. CSharp.CscDefines csharpproject : ABC DEF=5 ; # Add a GHI define globally. CSharp.CscDefines * : GHI ;
For the given C# project TARGET, assign the FLAGS to the configuration THE_CONFIG.
| TARGET | The target to assign the FLAGS to. TARGET is optional if rule ActiveProject PROJECT has been specified. If TARGET is *, the flags are made available globally. | |
| FLAGS | The list of flags to apply. | |
| THE_CONFIG | (optional) If not specified, the default is all configurations. |
# Assign /platform:x86 to all configurations of the target csharpapp. CSharp.CscFlags csharpapp : /platform:x86 ; # Turn on optimizations for the Release configuration. CSharp.CscFlags csharpapp : /optimize+ : release ;
Compiles C# SOURCES and links them into TARGET. This is just a passthrough rule for rule_CSharp_Assembly "CSharpAssembly".
CSharp.Application helloworld : helloworld.cs ;
Compiles C# SOURCES and links them into TARGET.
| TARGET | The target to link SOURCES into. The target name is given without extension. A platform specific extension will be generated, often reflecting a configuration type. TARGET is optional if rule ActiveProject PROJECT has been specified. | |
| SOURCES | The list of .cs files to link into the application. | |
| OPTIONS | (optional) The following options are available: |
console(default) - Builds a console application.library- Builds a library.module- Builds a module.windows- Builds a GUI application.
CSharp.Assembly helloworld : helloworld.cs ;
Compiles C# SOURCES and links them into the library TARGET. This is just a passthrough rule for rule_CSharp_Assembly "CSharpAssembly" with the library option.
CSharp.Library mylibrary : mysource.cs ;
Makes TARGET depend on ASSEMBLIES and includes them during linking.
| TARGET | The target to link ASSEMBLIES to. TARGET is optional if rule ActiveProject PROJECT has been specified. | |
| ASSEMBLIES | The list of assemblies to apply. These libraries are prebuilt assemblies, such as System.Core.dll. For those assemblies generated from the CSharpAssembly rule, use the "LinkAssemblies" rule. | |
| THE_CONFIG | (optional) If not specified, the default is all configurations. |
CSharp.ReferenceAssemblies WindowsFormsApplication :
System.Core.dll
System.Data.DataSetExtensions.dll
System.Data.dll
System.Deployment.dll
System.dll
System.Drawing.dll
System.Windows.Forms.dll
System.Xml.dll
System.Xml.Linq.dll
;
For the given project TARGET, make the reference search paths PATHS available to configuration THE_CONFIG.
| TARGET | The target to assign the reference paths to. TARGET is optional if rule ActiveProject PROJECT has been specified. If TARGET is *, the defines are made available globally. | |
| PATHS | The list of reference search paths to apply. Absolute paths are used directly. Relative paths are local to . That is, they are relative to the subdirectory specified via SubDir. | |
| THE_CONFIG | (optional) If not specified, the default is all configurations. |
# Add c:/assemblies to myproject for all configurations. CSharp.ReferencePaths myproject : c:/assemblies ; # Relative path: CSharp.ReferencePaths myproject : ../libs ;