[Mono-bugs] [Bug 343956] New: Cannot use VBCodeProvider
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Mon Nov 26 04:57:56 EST 2007
https://bugzilla.novell.com/show_bug.cgi?id=343956
Summary: Cannot use VBCodeProvider
Product: Mono: Class Libraries
Version: 1.2.6
Platform: Other
OS/Version: Other
Status: NEW
Severity: Normal
Priority: P5 - None
Component: System
AssignedTo: mono-bugs at ximian.com
ReportedBy: kobruleht2 at hot.ee
QAContact: mono-bugs at ximian.com
Found By: ---
To reproduce, run code.
Observed:
1 Errors:
Line: 0 -
Code:
using System;
using System.Windows.Forms;
using Microsoft.VisualBasic;
using System.CodeDom.Compiler;
public class Test
{
[STAThread]
static void Main()
{
try
{
VBCodeProvider provider = new VBCodeProvider();
CompilerParameters compilerParameters = new CompilerParameters();
compilerParameters.GenerateInMemory = true;
string code = @"Public Class MyClassn
Sub New()
End Sub
' this is the code in the <Code> tag
End Class
";
CompilerResults compilerResults =
provider.CompileAssemblyFromSource(compilerParameters,
code);
if (compilerResults.Errors.HasErrors)
{
string msg;
msg = compilerResults.Errors.Count.ToString() + " Errors:";
for (int x = 0; x < compilerResults.Errors.Count; x++)
msg = msg + "\r\nLine: " +
compilerResults.Errors[x].Line.ToString() + " - " +
compilerResults.Errors[x].ErrorText;
MessageBox.Show(msg);
}
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString());
}
}
}
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
More information about the mono-bugs
mailing list