premake/website/docs/clr.md
Sam Surtees 0e70ae7ab0 Added check for missing values in documentation to docs-check action
- Added missing values in documentation files
2021-11-03 02:52:20 +10:00

1.5 KiB

Enables Microsoft's Common Language Runtime for a project or configuration.

clr "value"

See /clr (Common Language Runtime Compilation) in the Visual Studio documentation for more information.

Parameters

value is one of the following:

Value Description
Off No CLR support
On Enable CLR support
Pure Enable pure mode MSIL. Equivalent to "On" for .NET projects.
Safe Enable verifiable MSIL. Equivalent to "On" for .NET projects.
Unsafe Enable unsafe operations. Equivalent to "On" for Managed C++ projects.
NetCore Needs documentation

CLR settings that do not make sense for the current configuration, such setting CLR support for a C# project to "Off", will be ignored.

Applies To

Project configurations.

Availability

Premake 5.0.

Examples

Set up a managed C++ project.

project "MyProject"
  kind "ConsoleApp"
  language "C++"
  clr "On"

Enable unsafe code in a C# project.

project "MyProject"
  kind "ConsoleApp"
  language "C#"
  clr "Unsafe"