CompileAssemblyFromDomBatch and compile errors

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Jay (Jay_at_discussions.microsoft.com)
Date: 02/02/05


Date: Wed, 2 Feb 2005 08:45:06 -0800

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?



Relevant Pages

  • RE: CompileAssemblyFromDomBatch and compile errors
    ... The CodeSnippetCompileUnit has a LinePragma ... What you would do to control the temp file name if you were using the base ... CodeCompileUnit object, I don't know. ... > attempting to compile using the CompileAssemblyFromDomBatch method. ...
    (microsoft.public.dotnet.framework)
  • Re: Tracks Poll
    ... pull cover songs from different shows and compile them for release. ... will release a bunch accordingly. ... outstanding or rare performances. ...
    (rec.music.artists.springsteen)
  • How to compile the old DefaultWsdlHelpGenerator.aspx
    ... I've been trying to compile the old DefaultWsdlHelpGenerator.aspx page ... shipped with .Net Fx 1.1 bits in VS 2005 RTM. ... some of the HTML controls do not seem to have old properties ... Thanks a bunch in advance for your valuable feedback. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: [SLE] VMWorkstation 4.0.5 and kernel 2.4.21-192 again
    ... >> When invoking the runme.pl script, it failed to compile the vmmon.o ... Thanks a bunch. ...
    (SuSE)
  • Adding external C code to a project
    ... I have a bunch of .c files I need to use in a project. ... I had added the fileinto my project, which compile fine, but attempts to call routines fail as the references aren't resolved. ... Opinions expressed here are mine and not necessarily those of my employer! ...
    (comp.sys.mac.programmer.help)