CompilerCompileFromString Method

Compiles a .NET assembly from the specified source code string.

Definition

Namespace: DevCase.Core.Diagnostics.CodeCompilation
Assembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
public virtual CompilerResultsEx CompileFromString(
	AssemblyType netAssembly,
	string targetFile,
	string sourceCode,
	string mainClass,
	IEnumerable<string> referencedAssemblies = null,
	IEnumerable<string> resources = null,
	string iconFile = ""
)

Parameters

netAssembly  AssemblyType
The target kind of .NET assembly.
targetFile  String
The target local file to create.
sourceCode  String
The input source code to compile.
mainClass  String
The name of the class that provides the entry point for the application.
referencedAssemblies  IEnumerableString  (Optional)
The referenced assemblies.
resources  IEnumerableString  (Optional)
The managed .NET resources.
iconFile  String  (Optional)
The icon used to set the appereance of the executable file.

Return Value

CompilerResultsEx

[Missing <returns> documentation for "M:DevCase.Core.Diagnostics.CodeCompilation.Compiler.CompileFromString(DevCase.Core.Diagnostics.CodeCompilation.AssemblyType,System.String,System.String,System.String,System.Collections.Generic.IEnumerable{System.String},System.Collections.Generic.IEnumerable{System.String},System.String)"]

Exceptions

Exception The current CodeDomProvider does not support resource embedding.

See Also