The Output
property of the Compiler
class provides access to the results of the most recent build process. This includes information about whether the build was successful, as well as any output generated during the build.
The Output
property of the Compiler
class provides access to the results of the most recent build process. This includes information about whether the build was successful, as well as any output generated during the build.
Use the Output
property to retrieve the results of the last build operation performed by the Compiler
instance. This can be useful for checking the success of the build and for accessing any generated output or diagnostic information.
// Example of accessing the Output property Compiler compiler = new Compiler(); // Assume some build process has been executed CompilerOutput lastBuildOutput = compiler.Output; // Check if the last build was successful bool wasSuccessful = lastBuildOutput.Successful; // Access any output or diagnostics string buildMessages = lastBuildOutput.Messages; // Output the success status and messages // Note: Avoid using Console.WriteLine in Sandbox // Instead, use appropriate logging or UI display methods Log.Info($"Build Successful: {wasSuccessful}"); Log.Info($"Build Messages: {buildMessages}");