[Mono-bugs] [Bug 61492][Min] New - CSharpCodeCompiler fails on CompileAssemblyFromDomBatch

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Tue, 13 Jul 2004 16:32:48 -0400 (EDT)


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by peter@newton.cx.

http://bugzilla.ximian.com/show_bug.cgi?id=61492

--- shadow/61492	2004-07-13 16:32:48.000000000 -0400
+++ shadow/61492.tmp.19951	2004-07-13 16:32:48.000000000 -0400
@@ -0,0 +1,32 @@
+Bug#: 61492
+Product: Mono: Class Libraries
+Version: unspecified
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Minor
+Component: System
+AssignedTo: atsushi@ximian.com                            
+ReportedBy: peter@newton.cx               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: CSharpCodeCompiler fails on CompileAssemblyFromDomBatch
+
+The CSharpCodeCompiler class doesn't work if you call
+CompileAssemblyFromDomBatch with more than one CodeCompileUnit passed to
+it. This is because it tries to create a bunch of temporary files like this:
+
+foreach (CodeCompileUnit e in ea) {
+     fileNames [i] = GetTempFileNameWithExtension (options.TempFiles, "cs");
+
+However, if you read the documentation for the TempFileCollection, you see
+that it will always return the same filename when given the same extension.
+(An idiotic semantic IMHO, but that's beside the point.) Anyway the code
+tries to create the same file twice and you get an exception.
+
+Soon-to-be-attached patch munges in the index variable i in the extension,
+so that the files have unique names.