UtilNetCodeCompilerCompileProject(String, MsBuildVersion, String, String) Method
Compiles a Visual Studio project or solution.
Namespace: DevCase.Core.Diagnostics.CodeCompilationAssembly: 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
)
Public Shared Function CompileProject (
filepath As String,
compilerVersion As MsBuildVersion,
configurationName As String,
platformName As String
) As String
Dim filepath As String
Dim compilerVersion As MsBuildVersion
Dim configurationName As String
Dim platformName As String
Dim returnValue As String
returnValue = UtilNetCodeCompiler.CompileProject(filepath,
compilerVersion, configurationName,
platformName)
public:
static String^ CompileProject(
String^ filepath,
MsBuildVersion compilerVersion,
String^ configurationName,
String^ platformName
)
static member CompileProject :
filepath : string *
compilerVersion : MsBuildVersion *
configurationName : string *
platformName : string -> string
No code example is currently available or this language may not be supported.
- 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")
String
If the compiler operation succeeds, the return value is
String,
otherwise, the return value contains the error output generated by the compiler.
This is a code example.
No code example is currently available or this language may not be supported.
Dim compileResult As String = CompileProject("C:\Solution.sln", NetFxCompilerVersion.NetFx40x64, "Debug", "Any CPU")
If Not String.IsNullOrEmpty(compileResult) Then
' Show error output...
MessageBox.Show(compileResult)
End If
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
InvalidEnumArgumentException
|
compilerVersion
|
Exception
|
A 64-Bit compiler cannot run under a 32-Bit operating system.
|
Exception
|
Directory not found for the specified compiler version.
|