Question

I am trying to find all the possible parameters that can be used with CompilerParameters.CompilerOptions with explanation. I cant find it on google, not even at MSDN. I am using it with CPPCodeProvider. Can anyone with the knowledge please help me with the issue. I have provided the example below, but cant understand what these parameters do.

string options = "/optimize+ /platform:x86 /target:winexe /unsafe";

Thanks :)

Was it helpful?

Solution

You can find all the compiler options with brief descriptions on MSDN:

C# Compiler Options Listed Alphabetically

Here are the descriptions for the ones in your question:

/optimize

Enables/disables optimizations.

/platform

Limits which platforms this code can run on:
x86, Itanium, x64, anycpu, or anycpu32bitpreferred. The default is anycpu.

/target

Specifies the format of the output file by using one of four options:
/target:appcontainerexe, /target:exe, /target:library, /target:module, /target:winexe, /target:winmdobj

/unsafe

Allows unsafe code.

OTHER TIPS

Is this the documentation you are looking for:

http://msdn.microsoft.com/en-us/library/6ds95cz0.aspx

Have a look here: at MSDN - C# Compiler Options Listed Alphabetically

  • /optimize: Enables/disables optimizations.
  • /platform: Limits which platforms this code can run on: x86, Itanium, x64, anycpu, or anycpu32bitpreferred. The default is anycpu.
  • /target: Specifies the format of the output file by using one of four options:/target:appcontainerexe, /target:exe, /target:library, /target:module, /target:winexe, /target:winmdobj.
  • /unsafe: Allows unsafe code.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top