From andyhume32 at yahoo.co.uk Fri Oct 12 07:18:43 2007
From: andyhume32 at yahoo.co.uk (Andy Hume)
Date: Fri, 12 Oct 2007 12:18:43 +0100
Subject: [mono-vb] A tool to have MSBuild use the Mono compilers
Message-ID: <004001c80cc1$a65ca510$0302a8c0@alanpc1>
I've seen requests in the past for how to have MSBuild use the Mono compilers. I attach a tool to allow this. It can be useful in troubleshooting to find whether a problem is with xbuild/monodevelop or with the compiler etc.
[[
//
// Copyright (c) 2007 Andy Hume.
// No restrictions, free for any use.
//
//==============================================================================
//
// This tool configures MSBuild to use the Mono compilers. This can be useful
// in some situations. For instance I had an issue where neither xbuild nor
// monodevelop would compile a project, but on using this tool the issue was shown
// to be a compiler issue.
//
// Two parts are needed, firstly a .targets file to configure MSBuild to look in
// a new location for the compilers. The second part is an executable that fulfills
// two purposes, firstly MSBuild still looks for compiler filenames csc.exe and
// vbc.exe. But secondly, neither of the Mono compilers support all the command-
// line options used by the MSFT tools, nor are all the assemblies supported, so
// we strip or convert both these -- for details see the code below.
//
// Note the MSFT versions of the other compiler utilities are still used e.g. resgen
// etc.
//
//
// So to use this tool, compile this program creating csc.exe and vbc.exe (e.g.
// compile it to csc.exe and copy it to vbc.exe). Then take the xml content below,
// update the paths and save it to e.g. Mono.Compilers.targets.
//
/*
D:\Temp\MonoMsbuild
D:\Temp\MonoMsbuild
false
*/
//
// That targets file can then be included in a MSBuild project to have it use the
// Mono compilers. One way is to use a command-line of the following form:
//
// Msbuild /p:CustomAfterMicrosoftCommonTargets="D:\Temp\Mono.Compilers.targets" MySolution.sln
//
// Note: the targets file path must be absolute and there is no warning if the
// file isn't found.
//
// It is also possible to reference the file from the project file. It is further
// possible to always include that .targets file and make the content of the .targets
// file itself conditional and thus the Mono compilers are used only when a certain
// command-line flag is set -- this is how MSBee, the MSBuild FX1.1 builder from
// http://www.codeplex.com/MSBee, is configured.
//
//
// * How do I know it's working?
// The tool logs the changes it makes to the compiler options, so see warnings
// in the MSBuild output like:
// MsBMono : warning XXX999: Was: <<.........>>
// MsBMono : warning XXX999: Is now: <<.........>>
// And if using the up-to-date vbnc case, see below, see also:
// VBC : warning : VBNC2009: the option doc was not recognized - ignored
//
//==============================================================================
//
// * Changes
// The three VBNC bugs mentioned below are all fixed (>=r86687), so those pieces of
// functionality are unnecessary in the tool, so if using an up-to-date version
// of vbnc, then in UnsupportedOptionsVbnc you must comment-out "define" and may
// comment-out "doc".
//
//
// What this program does. Firstly, as noted above the compilers must be files
// named csc.exe and vbc.exe. Secondly it handles mapping command-line options
// and assemblies to forms supported by Mono.
//
// The command-line passed from MSBuild is always of the simple form:
//
// "absolute\path\compiler.exe" /noconfig @"absolute\path\rspfile.tmp"
//
// From that we parse the compiler name, "csc" or "vbc", and also the path to the
// response file, and in the end I we execute e.g.
//
// "gmcs.bat" /noconfig @"absolute\path\rspfile.tmp"
//
// However, as noted above we need to modify the command-line options which are
// passed in the rsp file. For example gmcs doesn't support /errorprompt and vbnc
// doesn't support /doc (though it says it ignores it (bug 325332). For options
// in this category we just cut them to the first space character, but leave them
// in place it any quote is found.
//
// However there is also one option that needs special-case handling. VB's "Compiler
// Constants" (#defines) support values possibly including spaces, thus the command-
// line option used by MSBuild is doubly-quoted, eg:
//
// /define:"AA=\"aaa\",BB=-1,CC=\"ccc\"
//
// However vbnc doesn't support this form (bug 325976), so we map this into a supported
// form where possible.
//
// As well as options, we also support removing unsupprted assemblies. The assembly
// System.Deployment.dll is referenced by Visual Studio Windows Forms projects
// however Mono doesn't include it, by default it isn't used and we can thus remove
// its reference.
//
// There is one remaining feature that could be added. In its current state vbnc
// reports many of its errors in raw for or just as exception output and thus because
// these are not reported in the standard error format xbuild, monodevelop, and
// MSBuild all discard these errors and don't report them to the user (bug 328106).
// The tool could be enhanced by detecting such raw errors and prefixing them with
// a correctly formatted error prefix such as:
//
// MonoMsbuild: unhandled error MMB000:
//
// See http://channel9.msdn.com/wiki/default.aspx/MSBuild.CanonicalErrorWarningSpec
// and http://blogs.msdn.com/msbuild/archive/2006/11/03/msbuild-visual-studio-aware-error-messages-and-message-formats.aspx
//
//==============================================================================
using System;
using System.Diagnostics;
using System.IO;
using System.Windows.Forms;
using System.Text.RegularExpressions;
static class CscVbcCallMonoEquivalent
{
//
// The paths to the Mono compilers, if they're in the path then no path is needed
// for them here just "gmcs.bat" etc will suffice.
//
const string GmcsPath = @"gmcs.bat";
const string VbncPath = @"vbnc.bat";
// TODO ?Read these from somewhere.
//const string GmcsPath = @"D:\Program Files\Mono-1.2.5\bin\gmcs.bat";
//const string VbncPath = @"D:\Program Files\Mono-1.2.5\bin\vbnc.bat";
//
// The command-line options not supported by each of the Mono compilers.
//
static readonly String[] UnsupportedOptionsGmcs = {
// <>
"errorreport",
};
static readonly String[] UnsupportedOptionsVbnc = {
// vbnc can't handle quoted /define values in rsp files. With this content:
// <>
// it produces
// <>
// We strip all the quotes here. Hope there's no spaces etc!
"define",
// <>
// Says ignored but isn't!
"doc",
// Is supported "errorreport",
};
//
// Any assembly references we should remove. For example System.Deployment.dll
// seems to be added by default for WinForms apps created in VS but it isn't used
// by default, Mono doesn't include it so we need to remove its reference.
//
static readonly String[] UnsupportedAssemblies = {
"System.Deployment.dll"
};
//----
// The format of the command-line used by MSBuild when running the compiler.
// Examples are
// <<"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Csc.exe" /noconfig @"C:\Documents and Settings\andy\Local Settings\Temp\tmpEE.tmp">>
// <<"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Vbc.exe" /noconfig @"C:\Documents and Settings\andy\Local Settings\Temp\tmp76.tmp">>
// The real compiler options are passed in the rsp file.
const string MsBuildExecRxStr = "\".*\\\\([^\\\\]+).exe\"? /noconfig @\"([^\\\"]+)\"";
//----
static string s_dbgDescr;
//----
static int Main()
{
try {
//Info( "Iaaaaaaaa");
//Warning("Waaaaaaaa");
//RegexPlaying(RxStr);
//TestCountInstances();
//Console.WriteLine("----");
//----
// Parse the compiler (csc/vbc) and the rsp file passed.
string cl = Environment.CommandLine;
//Info("<>");
string compiler, rspFilePath;
ParseCmdLine(cl, out compiler, out rspFilePath);
s_dbgDescr = compiler + "->" + rspFilePath;
// Use that information to configure ourselves.
string compilerPath;
string[] badOptions;
switch (compiler.ToLowerInvariant()) {
case "csc":
compilerPath = GmcsPath;
badOptions = UnsupportedOptionsGmcs;
break;
case "vbc":
compilerPath = VbncPath;
badOptions = UnsupportedOptionsVbnc;
break;
default:
Error("Unknown compiler '" + compiler + "'.");
throw new ArgumentException();
}
//----
// Recreate the rsp file with options to suit the equivalent Mono compiler.
CleanOptionsFile(badOptions, rspFilePath);
//----
// Now run the Mono compiler.
string argsString = GetArgsString();
ProcessStartInfo psi = new ProcessStartInfo(compilerPath, argsString);
psi.UseShellExecute = false;
try {
using (Process proc = Process.Start(psi)) {
proc.WaitForExit();
return proc.ExitCode;
}//using
} catch (System.ComponentModel.Win32Exception winex) {
// Make a better message...
throw new System.ComponentModel.Win32Exception("Failed to run the compiler, probably exe/bat file not found.", winex);
}
} catch (Exception ex) {
//ErrorNoExit(ex.ToString());
//throw;
Error(ExceptionToStringMessage(ex));
throw new InvalidOperationException("Internal error -- Reached end of catch");
}
}
///
/// Get the first line of the exception ToString -- i.e. containing the type and message,
/// and the same for all 'inner' exceptions.
///
static string ExceptionToStringMessage(Exception ex)
{
System.Diagnostics.Debug.Assert(ex != null, "ExceptionToStringMessage--ArgNullEx");
int end = -1;
string message = ex.ToString();
end = message.IndexOf('\n');
int tmp = message.IndexOf('\r');
if (tmp != -1 && tmp < end) { end = tmp; }
if (end > -1) {
message = message.Substring(0, end);
}
System.Diagnostics.Debug.Assert(message.IndexOfAny(new char[]{'\n','\r'}) == -1);
return message;
}
enum MessageLevel
{
None = 0,
// ToString'd on output, so nicer if lower case
error,
warning,
info
}
static void ErrorNoExit(string message)
{
WriteErrorMessage(MessageLevel.error, message);
}
static void Error(string message)
{
ErrorNoExit(message);
Environment.Exit(1);
}
static void Warning(string message)
{
MessageBox.Show(message, s_dbgDescr);
WriteErrorMessage(MessageLevel.warning, message);
}
static void Info(string message)
{
// Info level messages are not displayed, so write as Warning.
WriteErrorMessage(MessageLevel.warning, message);
}
const string ToolName = "MsBMono";
static void WriteErrorMessage(MessageLevel category, string text)
{
WriteErrorMessage(ToolName, null, category, "XXX999", text);
}
static void WriteErrorMessage(string origin, string subcategory, MessageLevel category,
string errorCode, string text)
{
System.Text.StringBuilder bldr = new System.Text.StringBuilder();
if(!String.IsNullOrEmpty(origin)) {
bldr.Append(origin).Append(": ");
}
if(!String.IsNullOrEmpty(subcategory)) {
bldr.Append(subcategory).Append(" ");
}
bldr.Append(category.ToString()).Append(" ");
System.Diagnostics.Debug.Assert(!String.IsNullOrEmpty(errorCode));
System.Diagnostics.Debug.Assert(!String.IsNullOrEmpty(errorCode.Trim()));
bldr.Append(errorCode).Append(":");
if(!String.IsNullOrEmpty(text)) {
bldr.Append(" ").Append(text);
}
string msg = bldr.ToString();
// Test for validity against MSBuild's regex.
// (It doesn't allow 'info' etc, so only test for certain levels).
if(category == MessageLevel.warning || category == MessageLevel.error) {
System.Diagnostics.Debug.Assert(originCategoryCodeTextExpression.Match(msg).Success);
}
Console.WriteLine(msg);
}
// From the MSBuild wiki at channel9. This is apparently the pattern MSBuild
// uses to check if a compiler output line is a well-formed error message.
// Defines the main pattern for matching messages.
static private Regex originCategoryCodeTextExpression = new Regex(
// Beginning of line and any amount of whitespace.
@"^\s*"
// Match a [optional project number prefix 'ddd>'], single letter + colon + remaining filename, or
// string with no colon followed by a colon.
+@"(((?(((\d+>)?[a-zA-Z]?:[^:]*)|([^:]*))):)"
// Origin may also be empty. In this case there's no trailing colon.
+"|())"
// Match the empty string or a string without a colon that ends with a space
+"(?(()|([^:]*? )))"
// Match 'error' or 'warning' followed by a space.
+"(?(error|warning)) "
// Match anything without a colon, followed by a colon
+"(?[^:]*):"
// Whatever's left on this line, including colons.
+"(?.*)$",
RegexOptions.IgnoreCase);
static void CleanOptionsFile(string[] badOptionsNames, string rspPath)
{
#if false // test exception handling
try {
throw new RankException("Iiiii iiii.");
} catch(Exception ex) {
throw new InvalidOperationException("Eee eeee eeee.", ex);
}
#endif
string content;
using (StreamReader rdr = File.OpenText(rspPath)) {
content = rdr.ReadToEnd();
}
Info( "Was: <<" + content + ">>");
content = RemoveUnsupportedArgsEtc(badOptionsNames, content);
Info("Is now: <<" + content + ">>");
using (StreamWriter wtr = File.CreateText(rspPath)) {
wtr.Write(content);
}
}
static void ParseCmdLine(string cmdLine, out string compiler,
out string rspFilePath)
{
//compiler = "csc";
//rspFilePath = "tmpB8.tmp.txt";
Regex rx = new Regex(MsBuildExecRxStr);
Match m = rx.Match(cmdLine);
if (!m.Success) {
Error(@"Command-line not in expected "
+ @"{""\.exe"" /noconfig @""""} format.");
}
//DiagPrintMatch(m);
if (m.Groups.Count != 3) {
Error("Command-line regex didn't find two groups.");
}
//CaptureCollection cc = g.Captures;
compiler = m.Groups[1].Captures[0].Value;
rspFilePath = m.Groups[2].Captures[0].Value;
}
/// Gets the command-line argument as the original string.
/// Uses but removes
/// the program name from the front.
///
static string GetArgsString()
{
string[] cmdArray = Environment.GetCommandLineArgs();
string cl = Environment.CommandLine;
string argsString;
string cmd = cmdArray[0];
int idx = cl.IndexOf(cmd);
//Console.WriteLine("idx: {0}", idx);
if (idx == -1) {
Error("cmd not in command-line");
throw new ArgumentException();
}
int posArgs;
if (idx == 0) {
posArgs = cmd.Length + 0 + 1;
} else if (idx == 1) {
//Console.WriteLine("cl0: {0}, clX:{1}", cl[0], cl[cmd.Length + 2 - 1]);
if (cl[0] == '"' && cl[cmd.Length + 2 - 1] == '"'
&& cl[cmd.Length + 2 - 1 + 1] == ' ') {
posArgs = cmd.Length + 2 + 2;
} else {
Error("GetArgsString unsupported#1");
throw new ArgumentException();
}
} else {
Error("GetArgsString unsupported#2");
throw new ArgumentException();
}
// Remove the program and leave only the arguments.
argsString = cl.Substring(posArgs) + " ";
return argsString;
}
static string RemoveUnsupportedArgsEtc(string[] badOptionsNames,
String argsString)
{
argsString = RemoveUnsupportedOptions(badOptionsNames, argsString);
//
// Remove absolute path to FCL assemblies...
//
string Windir = Environment.GetEnvironmentVariable("windir"); // @"C:\WINDOWS";
string fclPath = Path.Combine(Windir,
@"Microsoft.NET\Framework\v2.0.50727\");
// Remove this assert if your windows directory is not C:\WINDOWS.
System.Diagnostics.Trace.Assert(fclPath
== @"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\");
argsString = argsString.Replace(fclPath, null);
//
// Remove unsupported assemblies -- not crucial hopefully...
//
foreach (string badAsmbly in UnsupportedAssemblies) {
// csc: one ref per /reference: option
argsString = argsString.Replace("/reference:" + badAsmbly, null);
// vbc: list of refs in one /reference: option
argsString = argsString.Replace("," + badAsmbly + ",", ",");
}
//
return argsString;
}
static string RemoveUnsupportedOptions(string[] badOptionsNames,
String argsString)
{
// Remove unsupported options
// First calculate what to do and finally do it.
if (badOptionsNames != null) {
foreach (string badOptName in badOptionsNames) {
// Remove from /optionName to terminating space
int idxOption = argsString.IndexOf("/" + badOptName);
if (idxOption == -1) { continue; }
int idxEnd = argsString.IndexOf(" ", idxOption);
if (idxEnd == -1) {
// ?Either error, or its the last option, so chop to the end.
Error("Strip option but no end space.");
}
string cut = argsString.Substring(idxOption, idxEnd - idxOption);
string replace = null;
//
// Special case: /define for VB
if (badOptName == "define") {
// Convert /define:"a=\"a\",b=\"b\"" to /define:a=a,b=b
// Needs to be in that simple form...
// First the inner backslash-quoted quotes.
int _countOfValueQuoting = CountInstances(cut, "\\\""); // a=\"aaa\"
if ((_countOfValueQuoting & 1) == 1) {
Warning("/define, odd number of value quotings.");
continue;
}
replace = cut.Replace("\\\"", null);
// Now the other quotes.
int countOfQuotes = CountInstances(cut, "\""); // /define:"a=\"aaa\""
if ((countOfQuotes & 1) == 1) {
Warning("/define, odd number of option quotes.");
continue;
}
replace = replace.Replace("\"", null);
} else if (cut.Contains("\"")) {
// More work to do here? Do we need to support general
// options with spaces and quoting etc.
// /doc doesn't generally, so we're ok so far...
//
Warning("Skipping removing option as its value is string delimited");
continue;
}
//
// Now actually do the cut/replace.
Info("gonna cut: <<" + cut + ">>" + (replace == null ? null
: " ** and put: <<" + replace + ">>"));
string join = argsString.Substring(0, idxOption)
+ replace + argsString.Substring(idxEnd);
argsString = join;
}
}
return argsString;
}
///
/// Count the instances of a string in a given string value -- this is not otherwise
/// supported AFAIK.
///
static int CountInstances(/*this*/ string thisParam, string value)
{
int count = 0;
int pos = 0;
while (true) {
int idx = thisParam.IndexOf(value, pos);
if (idx == -1) { break; }
++count;
pos = idx + value.Length;
if (pos >= thisParam.Length) { break; }
}//while
return count;
}
static void TestCountInstances()
{
string[][] values = {
new string[] { "/define:\"a=\\\"A\\\",b=\\\"B\\\",c=\\\"C\\\"", "\\\"", 6.ToString() },
new string[] { "/define:\"a=A,b=\\\"B\\\",c=C", "\\\"", 2.ToString() },
new string[] { "/define:\"aaa\\\"", "\\\"", 1.ToString() },
new string[] { "/define:\"a=A,b=B,c=C\"", "\\\"", 0.ToString() },
};
foreach (string[] cur in values) {
int count = CountInstances(cur[0], cur[1]);
Console.WriteLine("{0} {1}: {2} {3}",
count == int.Parse(cur[2]), count, cur[0], cur[1]
);
}//for
}
static void RegexPlaying(string rxStr)
{
Regex rx = new Regex(rxStr);
Console.WriteLine("rxStr: " + rxStr);
string tst = "\"C:\\Temp\\Csc.exe\" /noconfig @\"C:\\Temp\\tmpEE.tmp\"";
Console.WriteLine("tst: " + tst);
Match m = rx.Match(tst);
Console.WriteLine("m: " + m);
DiagPrintMatch(m);
Console.WriteLine();
tst = "\"C:\\Temp\\XXXX YYY\\Csc.exe\" /noconfig @\"C:\\Temp\\tmpEE.tmp\"";
Console.WriteLine("tst: " + tst);
m = rx.Match(tst);
Console.WriteLine("m: " + m);
DiagPrintMatch(m);
Console.WriteLine();
tst = "Csc.exe /noconfig @\"C:\\Temp\\tmpEE.tmp\"";
Console.WriteLine("tst: " + tst);
m = rx.Match(tst);
Console.WriteLine("m: " + m);
DiagPrintMatch(m);
Console.WriteLine();
tst = "Csc.exe /noconfig @\"C:\\Temp\\tmpEE.tmp\"";
Console.WriteLine("tst: " + tst);
m = rx.Match(tst);
Console.WriteLine("m: " + m);
DiagPrintMatch(m);
}
static void DiagPrintMatch(Match m)
{
Console.WriteLine("success: " + m.Success);
GroupCollection grps = m.Groups;
for (int i = 0; i < m.Groups.Count; i++) {
Group g = m.Groups[i];
Console.WriteLine("Group" + i + "='" + g + "'");
CaptureCollection cc = g.Captures;
for (int j = 0; j < cc.Count; j++) {
Capture c = cc[j];
System.Console.WriteLine("Capture" + j + "='" + c + "', Position=" + c.Index);
}
}
}
}//class
]]
From lenniedg at gmail.com Fri Oct 19 09:38:47 2007
From: lenniedg at gmail.com (Lennie De Villiers)
Date: Fri, 19 Oct 2007 15:38:47 +0200
Subject: [mono-vb] Webservice In VB.Net Mono
Message-ID:
Hi,
Is there an example on how to write a web service using VB.Net in Mono?
Can I also use WCF?
Kind Regards,
Lennie De Villiers
From rolflists at ya.com Fri Oct 19 09:52:55 2007
From: rolflists at ya.com (Rolf Bjarne Kvinge)
Date: Fri, 19 Oct 2007 15:52:55 +0200
Subject: [mono-vb] Webservice In VB.Net Mono
In-Reply-To:
References:
Message-ID: <022f01c81257$5a29e950$0e7dbbf0$@com>
> -----Original Message-----
> From: mono-vb-bounces at lists.ximian.com [mailto:mono-vb-
> bounces at lists.ximian.com] On Behalf Of Lennie De Villiers
>
> Hi,
>
> Is there an example on how to write a web service using VB.Net in Mono?
Not that I'm aware of.
You should however be able to use any C# guide (though I don't know if there
are any examples for C# either), and wherever you see 'C#' or 'gmcs' you
substitute with 'VB' and 'vbnc' and that's it :)
I'll put this on my todo list.
>
> Can I also use WCF?
>
You can use whatever you use in C#.
If the question is if you can use WCF in mono, then you'd have to ask in
mono-list list.
Rolf
> Kind Regards,
>
> Lennie De Villiers
> _______________________________________________
> Mono-vb mailing list
> Mono-vb at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-vb
From lenniedg at gmail.com Mon Oct 22 02:18:25 2007
From: lenniedg at gmail.com (Lennie De Villiers)
Date: Mon, 22 Oct 2007 08:18:25 +0200
Subject: [mono-vb] Contribute to VB.Net Mono
Message-ID:
Hi,
How can I contribute to development of VB.Net Mono?
Kind Regards,
Lennie De Villiers
From miguel at ximian.com Sat Oct 27 13:07:10 2007
From: miguel at ximian.com (Miguel de Icaza)
Date: Sat, 27 Oct 2007 13:07:10 -0400
Subject: [mono-vb] Contribute to VB.Net Mono
In-Reply-To:
References:
Message-ID: <1193504830.14230.46.camel@erandi.dom>
Hello,
> How can I contribute to development of VB.Net Mono?
An easy way is to look at existing bugs filed against the compiler and
try to implement a fix.
There are also a handful of classes in the VB.NET runtime that are not
finished (they are usually available on the MOMA reports). That could
use some help.
Miguel.
From andyhume32 at yahoo.co.uk Mon Oct 29 05:24:16 2007
From: andyhume32 at yahoo.co.uk (Andy Hume)
Date: Mon, 29 Oct 2007 09:24:16 -0000
Subject: [mono-vb] Contribute to VB.Net Mono
In-Reply-To:
References:
Message-ID: <004401c81a0d$7aa415d0$0302a8c0@alanpc1>
Speaking only as a user of the Mono project, here's my view. The best
way to contribute just now will be to use it! Simple as that... Find
what works and what doesn't and create bug reports.
Or in longer form... Take any programs you have from VB.NET on Windows
and use them on Mono (on Linux), and that tests the 'runtime'. Also
then use the compiler too. I've done some basic testing to ensure it
can compile WinForms apps (bug 333403 fixed, bug 333962 outstanding). I
had little success with monodevelop and xbuild, so that was using
MSBuild on Windows to drive vbnc. So there's work there too; to find
out what's needed, if anything, to have the two systems compile VB
projects. Also try compiling various forms of WinForms apps, those that
use the 'single instance' feature, settings, resources and such features
in the special My object tree. Also on monodevelop, does it handle
creating VB projects from scratch etc.
Then there's ASP.NET web sites and web services etc, they need test too.
As you yourself pointed out on this list. :-) That tests the compiler
too of course.
On the compiler I see two levels of 'bugs'. On the first type, it would
probably be very useful to ensure that the compiler can handle all
language features -- one could even start at the beginning of the
language spec and work to the end and hopefully test all the features
that way. :-) However, 'error handling' isn't implemented yet, so, in
my opinion, it's not useful to create reports of 'bad behaviour on this
bad code'. Easy to do, but IMHO not of much use until Rolf starts
implementing this feature.
I don't know about contributing code, maybe there's need for missing
features. I don't know; according to the class-status pages the runtime
is complete -- however I think it doesn't reports which method just
throw NotImplementedException...
Andy
> -----Original Message-----
> From: mono-vb-bounces at lists.ximian.com
> [mailto:mono-vb-bounces at lists.ximian.com] On Behalf Of Lennie
> De Villiers
> Sent: 22 October 2007 07:18
> To: mono-vb at lists.ximian.com
> Subject: [mono-vb] Contribute to VB.Net Mono
>
> Hi,
>
> How can I contribute to development of VB.Net Mono?
>
> Kind Regards,
>
> Lennie De Villiers
> _______________________________________________
> Mono-vb mailing list
> Mono-vb at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-vb
From andyhume32 at yahoo.co.uk Mon Oct 29 05:24:16 2007
From: andyhume32 at yahoo.co.uk (Andy Hume)
Date: Mon, 29 Oct 2007 09:24:16 -0000
Subject: [mono-vb] Microsoft.VisualBasic.targets on Linux
Message-ID: <004501c81a0d$7add4e40$0302a8c0@alanpc1>
I can't see the "Microsoft.VisualBasic.targets" file on my installation of Mono 1.2.5 on Linux (/usr/lib/mono/2.0). Can anyone see it in their installation? Or is it something that needs to be added to the installer for 1.2.6?
Andy
From rolflists at ya.com Mon Oct 29 08:40:52 2007
From: rolflists at ya.com (Rolf Bjarne Kvinge)
Date: Mon, 29 Oct 2007 13:40:52 +0100
Subject: [mono-vb] Contribute to VB.Net Mono
In-Reply-To: <004401c81a0d$7aa415d0$0302a8c0@alanpc1>
References:
<004401c81a0d$7aa415d0$0302a8c0@alanpc1>
Message-ID: <005301c81a28$f42f3e50$dc8dbaf0$@com>
Hi,
Andy has explained very well where you can contribute, I've included a
couple of comments inline.
>
> Speaking only as a user of the Mono project, here's my view. The best
> way to contribute just now will be to use it! Simple as that... Find
> what works and what doesn't and create bug reports.
>
>
> Or in longer form... Take any programs you have from VB.NET on Windows
> and use them on Mono (on Linux), and that tests the 'runtime'. Also
> then use the compiler too. I've done some basic testing to ensure it
> can compile WinForms apps (bug 333403 fixed, bug 333962 outstanding).
> I had little success with monodevelop and xbuild, so that was using
> MSBuild on Windows to drive vbnc. So there's work there too; to find
> out what's needed, if anything, to have the two systems compile VB
> projects. Also try compiling various forms of WinForms apps, those
> that use the 'single instance' feature, settings, resources and such
> features in the special My object tree.
>
> Also on monodevelop, does it handle creating VB projects from scratch etc.
>
Unfortunately not much work has gone into making VB projects work well in
MonoDevelop (most of the code is several years old, and has not been updated
for vbnc), here is one area where contributions are welcome.
> Then there's ASP.NET web sites and web services etc, they need test
> too. As you yourself pointed out on this list. :-) That tests the
compiler
> too of course.
>
> On the compiler I see two levels of 'bugs'. On the first type, it
> would probably be very useful to ensure that the compiler can handle all
> language features -- one could even start at the beginning of the
> language spec and work to the end and hopefully test all the features
> that way. :-) However, 'error handling' isn't implemented yet, so, in
> my opinion, it's not useful to create reports of 'bad behaviour on this
> bad code'. Easy to do, but IMHO not of much use until Rolf starts
> implementing this feature.
>
As Andy says vbnc does not cope well with bad code, and I'm aware of this
(no need to file bugs). I figured it was much more important to compile
correct code, so that's where I've spent my time. Which means that if you
have correct VB code that doesn't compile with vbnc, please do file bugs :)
> I don't know about contributing code, maybe there's need for missing
> features. I don't know; according to the class-status pages the
> runtime is complete -- however I think it doesn't reports which method
just
> throw NotImplementedException...
>
This is probably the easiest way to contribute if you want to write code:
find any method in the vbruntime that throws a NotImplementedException and
implement it. The class-status isn't very helpful here, it'll show
everything as complete, which isn't true.
Rolf
> Andy
>
>
> > -----Original Message-----
> > From: mono-vb-bounces at lists.ximian.com
> > [mailto:mono-vb-bounces at lists.ximian.com] On Behalf Of Lennie
> > De Villiers
> > Sent: 22 October 2007 07:18
> > To: mono-vb at lists.ximian.com
> > Subject: [mono-vb] Contribute to VB.Net Mono
> >
> > Hi,
> >
> > How can I contribute to development of VB.Net Mono?
> >
> > Kind Regards,
> >
> > Lennie De Villiers
> > _______________________________________________
> > Mono-vb mailing list
> > Mono-vb at lists.ximian.com
> > http://lists.ximian.com/mailman/listinfo/mono-vb
>
> _______________________________________________
> Mono-vb mailing list
> Mono-vb at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-vb
>
>
> --
> No virus found in this incoming message.
> Checked by AVG Free Edition.
> Version: 7.5.503 / Virus Database: 269.15.12/1097 - Release Date:
> 28/10/2007 13:58
From wberrier at novell.com Mon Oct 29 12:17:58 2007
From: wberrier at novell.com (Wade Berrier)
Date: Mon, 29 Oct 2007 10:17:58 -0600
Subject: [mono-vb] Microsoft.VisualBasic.targets on Linux
In-Reply-To: <004c01c81a22$af487230$0dd95690$@com>
References: <004501c81a0d$7add4e40$0302a8c0@alanpc1>
<004c01c81a22$af487230$0dd95690$@com>
Message-ID: <1193674678.4010.2.camel@moby.site>
Hi Rolf,
I didn't know this file was to be included (it's been missing since
1.2.3.1). It will be included in 1.2.6. I'll update the build service
rpms, but the linux installer won't be updated until 1.2.6 releases.
Wade
On Mon, 2007-10-29 at 12:56 +0100, Rolf Bjarne Kvinge wrote:
> Wade,
>
> Do you know why this file isn't being installed?
>
> I couldn't find it on my system either (it is in my local prefix where I
> install svn versions, but not in the system one, which was installed with
> openSuse 10.3).
>
> The only place I could find it svn is in mcs/tools/xbuild, and I couldn't
> find any reason there why Microsoft.CSharp.targets and
> Microsoft.Common.targets are installed, but not
> Microsoft.VisualBasic.targets.
>
> Rolf
>
> > -----Original Message-----
> > From: mono-vb-bounces at lists.ximian.com [mailto:mono-vb-
> > bounces at lists.ximian.com] On Behalf Of Andy Hume
> > Sent: lunes, 29 de octubre de 2007 10:24
> > To: mono-vb at lists.ximian.com
> > Subject: [mono-vb] Microsoft.VisualBasic.targets on Linux
> >
> > I can't see the "Microsoft.VisualBasic.targets" file on my installation
> > of Mono 1.2.5 on Linux (/usr/lib/mono/2.0). Can anyone see it in their
> > installation? Or is it something that needs to be added to the
> > installer for 1.2.6?
> >
>
> I do have this file on my system (but I don't update
>
>
> > Andy
> >
> > _______________________________________________
> > Mono-vb mailing list
> > Mono-vb at lists.ximian.com
> > http://lists.ximian.com/mailman/listinfo/mono-vb
> >
> >
> > --
> > No virus found in this incoming message.
> > Checked by AVG Free Edition.
> > Version: 7.5.503 / Virus Database: 269.15.12/1097 - Release Date:
> > 28/10/2007 13:58
>
>
From rolflists at ya.com Tue Oct 30 07:50:03 2007
From: rolflists at ya.com (Rolf Bjarne Kvinge)
Date: Tue, 30 Oct 2007 12:50:03 +0100
Subject: [mono-vb] Webservice In VB.Net Mono
In-Reply-To: <022f01c81257$5a29e950$0e7dbbf0$@com>
References:
<022f01c81257$5a29e950$0e7dbbf0$@com>
Message-ID: <00f801c81aeb$02648d00$072da700$@com>
> -----Original Message-----
> From: mono-vb-bounces at lists.ximian.com [mailto:mono-vb-
> bounces at lists.ximian.com] On Behalf Of Rolf Bjarne Kvinge
> Sent: viernes, 19 de octubre de 2007 15:53
> To: 'Lennie De Villiers'; mono-vb at lists.ximian.com
> Subject: Re: [mono-vb] Webservice In VB.Net Mono
>
>
>
> > -----Original Message-----
> > From: mono-vb-bounces at lists.ximian.com [mailto:mono-vb-
> > bounces at lists.ximian.com] On Behalf Of Lennie De Villiers
> >
> > Hi,
> >
> > Is there an example on how to write a web service using VB.Net in
> Mono?
>
> Not that I'm aware of.
>
> You should however be able to use any C# guide (though I don't know if
> there are any examples for C# either), and wherever you see 'C#' or 'gmcs'
> you substitute with 'VB' and 'vbnc' and that's it :)
>
> I'll put this on my todo list.
>
Lennie has contributed a simple sample, I put it here:
http://www.mono-project.com/Web_Services_(Visual_Basic)
Thanks Lennie!
Rolf
> >
> > Can I also use WCF?
> >
>
> You can use whatever you use in C#.
> If the question is if you can use WCF in mono, then you'd have to ask
> in
> mono-list list.
>
> Rolf
>
> > Kind Regards,
> >
> > Lennie De Villiers
> > _______________________________________________
> > Mono-vb mailing list
> > Mono-vb at lists.ximian.com
> > http://lists.ximian.com/mailman/listinfo/mono-vb
>
> _______________________________________________
> Mono-vb mailing list
> Mono-vb at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-vb