UtilNetCodeCompilerCompileProject(String, MsBuildVersion, String, String) Method

Compiles a Visual Studio project or solution.

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 static string CompileProject(
	string filepath,
	MsBuildVersion compilerVersion,
	string configurationName,
	string platformName
)

Parameters

filepath  String
The Visual Studio project or solution file.
compilerVersion  MsBuildVersion
The compiler version to build the source file.
configurationName  String
The configuration name to compile. (e.g: "Release")
platformName  String
The platform name to compile. (e.g: "Any CPU")

Return Value

String
If the compiler operation succeeds, the return value is String, otherwise, the return value contains the error output generated by the compiler.

Example

This is a code example.
C#
No code example is currently available or this language may not be supported.

Exceptions

InvalidEnumArgumentException compilerVersion
Exception A 64-Bit compiler cannot run under a 32-Bit operating system.
Exception Directory not found for the specified compiler version.

See Also