[Mono-bugs] [Bug 81961][Cri] New - Problem on CompileAssemblyFromSource

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Thu Jun 28 00:10:25 EDT 2007

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 miki.yokohata at infor.com.


--- shadow/81961	2007-06-28 00:10:25.000000000 -0400
+++ shadow/81961.tmp.17222	2007-06-28 00:10:25.000000000 -0400
@@ -0,0 +1,63 @@
+Bug#: 81961
+Product: Mono: Tools
+Version: 1.1
+OS: Red Hat 6.2
+OS Details: Linux Core 6
+Status: NEW   
+Severity: Unknown
+Priority: Critical
+Component: tools
+AssignedTo: mono-bugs at ximian.com                            
+ReportedBy: Miki.Yokohata at infor.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+Summary: Problem on CompileAssemblyFromSource
+When I use the following code and execute it, it works well on Windows XP
+However on Fedora Core 6 with MONO, it doesn't work because
+"oCResults.Errors.Count" always returns more than 0 but error message says
+"Compile finish successfully" and I cannot find any other messages.
+It seems the compile finish successfully but some messages are returned as
+ errors.
+This code worked well with MONO, but NOT with MONO 1.2.4
+Please fix it as soon as possible.
+Create Provider:
+Dim oCodeProvider As Microsoft.VisualBasic.VBCodeProvider 
+= New Microsoft.VisualBasic.VBCodeProvider
+Create Parameter, Result and Assembley:
+Dim oCParams As System.CodeDom.Compiler.CompilerParameters
+= New System.CodeDom.Compiler.CompilerParameters
+        	Dim oCResults As System.CodeDom.Compiler.CompilerResults
+        	Dim oAssy As System.Reflection.Assembly
+Setting up parameters for compilation:
+oCParams.MainClass = "Crass Name here"
+oCParams.GenerateExecutable = False
+oCParams.GenerateInMemory = True
+Executing compilation:
+oCResults = oCodeProvider.CompileAssemblyFromSource(oCParams, DotNetCode)
+		(DotNetCode holds vbScript being compiled)
+Checking compilation erros:
+If (oCResults.Errors.Count > 0) Then
+Dim ErrMsg As String = ""
+Dim delim As String = vbCr
+For c As Short = 0 To oCResults.Errors.Count - 1
+ErrMsg = ErrMsg & delim & oCResults.Errors(c).ToString
+delim = vbCrLf
+Throw New System.Exception(ErrMsg)
+End If

More information about the mono-bugs mailing list