G
Guest
I'm constructing a bunch of code into a set of CodeCompileUnit's and then
attempting to compile using the CompileAssemblyFromDomBatch method.
This works great assuming the compile is successful. If the compile is not
successful, the CompilerResults has a Errors collection with a set
CompilerError objects to point out the errors.
Here's the problem; internally the C# compiler is generating a bunch of temp
files and the CompilerError.FileName points back to the temp file name where
the error is. It doesn't seem to have any reference back to the original
CodeCompileUnit, so I have no idea where the error is.
Is there a way to correlate the CompilerError or FileName back to
CodeCompileUnits that caused the error rather than temp files? Or do I have
to explicitly generate the files and then compile the files to know which
compile units contain the errors myself?
attempting to compile using the CompileAssemblyFromDomBatch method.
This works great assuming the compile is successful. If the compile is not
successful, the CompilerResults has a Errors collection with a set
CompilerError objects to point out the errors.
Here's the problem; internally the C# compiler is generating a bunch of temp
files and the CompilerError.FileName points back to the temp file name where
the error is. It doesn't seem to have any reference back to the original
CodeCompileUnit, so I have no idea where the error is.
Is there a way to correlate the CompilerError or FileName back to
CodeCompileUnits that caused the error rather than temp files? Or do I have
to explicitly generate the files and then compile the files to know which
compile units contain the errors myself?