[Mono-list] Mono-list Digest, Vol 60, Issue 18

TiMoch timoch at timoch.com
Mon Apr 12 13:08:13 EDT 2010


help

-----Original Message-----
From: mono-list-bounces at lists.ximian.com
[mailto:mono-list-bounces at lists.ximian.com] On Behalf Of
mono-list-request at lists.ximian.com
Sent: lundi 12 avril 2010 17:10
To: mono-list at lists.ximian.com
Subject: Mono-list Digest, Vol 60, Issue 18

Send Mono-list mailing list submissions to
	mono-list at lists.ximian.com

To subscribe or unsubscribe via the World Wide Web, visit
	http://lists.ximian.com/mailman/listinfo/mono-list
or, via email, send a message with subject or body 'help' to
	mono-list-request at lists.ximian.com

You can reach the person managing the list at
	mono-list-owner at lists.ximian.com

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Mono-list digest..."


Today's Topics:

   1. Re: Seeking advice on using monodevelop to learn CSharp (Stifu)
   2. Re: About converting a program (Abe Gillespie)
   3. Invalid data from CP2102 USB device (Steve Ricketts)
   4. Any way to tell what the valid baud rates are for a USB
      device? (Steve Ricketts)
   5. I cannot get working Mono with MySql connector and the
      System.Data.Common namespace (vtortola)
   6. Re: I cannot get working Mono with MySql connector and the
      System.Data.Common namespace (Robert Jordan)


----------------------------------------------------------------------

Message: 1
Date: Mon, 12 Apr 2010 04:20:54 -0800 (PST)
From: Stifu <stifu at free.fr>
Subject: Re: [Mono-list] Seeking advice on using monodevelop to learn
	CSharp
To: mono-list at lists.ximian.com
Message-ID: <1271074854494-1837036.post at n4.nabble.com>
Content-Type: text/plain; charset=us-ascii


If I were you, what I'd do would be to debug the program step by step in
MonoDevelop, to find out what's wrong. Given the program starts at all,
which might not be the case.

If I could get my hands on either your source code or exe, I might be able
to help more.


satimis wrote:
> 
> Hi Stifu,
> 
> 
> You are correct, "mono --version" showing 1.9.1
> 
> $ mono Desktop/.exe
> actually is "mono /path/to/.exe file"
> 
> 
> $ apt-cache policy mono-devel
> mono-devel:
>   Installed: (none)
>   Candidate: 2.4.2.3+dfsg-2~bpo50+1
>   Version table:
>      2.4.2.3+dfsg-2~bpo50+1 0
>           1 http://www.backports.org lenny-backports/main Packages
> 
> mono-devel not installed yet.
> 
> 
> $ sudo aptitude -t lenny-backports install mono-devel
> 
> mono version now upgraded
> 
> $ mono --version
> Mono JIT compiler version 2.4.2.3 (Debian 2.4.2.3+dfsg-2~bpo50+1)
> Copyright (C) 2002-2008 Novell, Inc and Contributors. www.mono-project.com
>     TLS:           __thread
>     GC:            Included Boehm (with typed GC)
>     SIGSEGV:       altstack
>     Notifications: epoll
>     Architecture:  x86
>     Disabled:      none
> 
> 
> $ mono /path/to/.exe --debug
> 
> Still the same warning popup
> 
> 
> B.R.
> SL
> 
> 
> 
> 
> 
> 
> ----- Original Message ----
> From: Stifu <stifu at free.fr>
> To: mono-list at lists.ximian.com
> Sent: Mon, April 12, 2010 3:49:37 AM
> Subject: Re: [Mono-list] Seeking advice on using monodevelop to learn
> CSharp
> 
> 
> Let's be clear: your app is either a GTK# or a WinForms app, not both.
> Since you made it on Windows with Visual Studio, I assume it is a WinForms
> app. Therefore, it doesn't require GTK# (or MonoDevelop) to run on Linux.
> 
> Note that when running the application through command line, you can add
> "--debug" at the end to have more information.
> 
> About this: "mono Desktop/.exe"
> 
> What is this slash doing there? Is it a typo?
> 
> By the way, from what you posted, I'm afraid you might be using Mono 1.9.1
> rather than 2.4.2.3, I don't know for sure though. Type "mono --version"
> to
> find out which version you're on. Mono 1.9.1 is "only" 2 years old, but
> loads of improvements have been made since then.
> 
> If you want, I could also try to run your application if you send it to
> me.
> 
> 
> satimis wrote:
>> 
>> Hi Stifu,
>> 
>>> This might be your problem. Look for
>>> "libmono-winforms2.0-cil" in your distribution software repository (if
>>> that
>>> fails, look for any name that contains "winforms", in case it's called
>>> differently in your distro).
>> 
>> 
>> libmon-winform2.0-cil has been installed here;
>> 
>> $ apt-cache policy libmono-winforms2.0-cil
>> libmono-winforms2.0-cil:
>>   Installed: 1.9.1+dfsg-6
>>   Candidate: 1.9.1+dfsg-6
>>   Version table:
>>      2.4.2.3+dfsg-2~bpo50+1 0
>>           1 http://www.backports.org lenny-backports/main Packages
>>  *** 1.9.1+dfsg-6 0
>>         500 http://ftp.hk.debian.org lenny/main Packages
>>         100 /var/lib/dpkg/status
>> 
>> 
>> satimis
>> 
>> 
>> 
>> 
>> 
>> ----- Original Message ----
>> From: Stifu <stifu at free.fr>
>> To: mono-list at lists.ximian.com
>> Sent: Mon, April 12, 2010 3:06:49 AM
>> Subject: Re: [Mono-list] Seeking advice on using monodevelop to learn
>> CSharp
>> 
>> 
>> What is the exact error?
>> It's possible you don't have everything installed (this depends on your
>> Linux distribution, and I don't think you've stated which one you're on).
>> If
>> I remember correctly, Ubuntu doesn't include WinForms by default, and
>> requires you to install it separately. This might be your problem. Look
>> for
>> "libmono-winforms2.0-cil" in your distribution software repository (if
>> that
>> fails, look for any name that contains "winforms", in case it's called
>> differently in your distro).
>> 
>> 
>> sai ram wrote:
>>> 
>>> Hi,
>>> 
>>> I tried as u said...
>>> 
>>> 1. When i run Console Application it works perfectly... (VS2008 is not
>>> designed only for console applications rite...)
>>> 
>>> 2. When i try to run Win Form Application (C#) Using Mono application in
>>> Linux ,  It shows an Assembly - GAC error
>>> 
>>> -- Even i tried installing dll files into GAC Cache
>>> 
>>> -- STill the same error persists........
>>> 
>>> --Dono how to proceed further.. Kindly help me out..
>>> 
>>> eagerly waiting for ur reply....
>>> 
>>> 
>>> 
>>> 
>>> Sairam L
>>> sairam at sofist.com
>>> Phone: 91-44-28155334, 28155336, 42129885
>>> Fax: 91-44-42123885fd
>>> [URL= http://www.sofist.com][IMG]
>>> http://www.sofist.com/images/logo.jpg[/IMG][/URL]
>>> 70, Thyagaraya Rd.
>>> T. Nagar
>>> Chennai 600017
>>> Tamil Nadu, India
>>> www.sofist.com
>>> ------------------------------------------------------------------
>>> StatMax - Your one-stop Statistical solutions
>>> 
>>> 
>>> 
>>> On Mon, Apr 12, 2010 at 12:32 PM, Stifu <stifu at free.fr> wrote:
>>> 
>>>>
>>>> Solutions (sln), projects (csproj) and last but not least: C# code;
>>>> it's
>>>> all
>>>> exactly the same regardless of the IDE. There is nothing to recode,
>>>> whether
>>>> you started with Visual Studio or MonoDevelop. You can open a Visual
>>>> Studio
>>>> project in MonoDevelop, and vice versa.
>>>>
>>>> You don't even need to recompile your code with MonoDevelop for it to
>>>> work
>>>> on Linux. You can just use the exe directly. This means you can just
>>>> stick
>>>> to a single IDE.
>>>>
>>>> To run the exe, the most basic way to do it is through command line:
>>>> "mono
>>>> myapp.exe"
>>>> Personally, I like to right click the exe and to select to run it with
>>>> Mono
>>>> (an option that may not be there by default, but which will stick after
>>>> you've used it once, by selecting mono among the installed
>>>> applications).
>>>>
>>>> Look around the net for more information.
>>>>
>>>>
>>>> sai ram wrote:
>>>> >
>>>> > My Doubt is :
>>>> >
>>>> > 1. Assume, I created one Big App (1000 lines of code) in VS2008 Win
>>>> Form
>>>> > Application on Windows. I installed MONO for VS2008 and executed
>>>> > successfully.
>>>> > 2. Now i want to run that files in SUSE Linux.
>>>> >
>>>> > For the 2nd Option, What I have to do in this foll options .... ?
>>>> >
>>>> > a. Install MonoDevelop (on windows), Study Mono Develop coding's &
>>>> syntax,
>>>> > Using the new language, code the program (1000 lines of code) &
>>>> Execute
>>>> on
>>>> > windows. After execute deploy it in linux ?
>>>> >
>>>> > [OR]
>>>> >
>>>> > b. Or Just copy the VS2008 Codes and run in SUSE Linux Using Mono.
>>>> >
>>>> > Which option i have to do now......?
>>>> >
>>>> >
>>>> >
>>>> >
>>>> > Sairam L
>>>> > sairam at sofist.com
>>>> > Phone: 91-44-28155334, 28155336, 42129885
>>>> > Fax: 91-44-42123885fd
>>>> > [URL= http://www.sofist.com][IMG]
>>>> > http://www.sofist.com/images/logo.jpg[/IMG][/URL]
>>>> > 70, Thyagaraya Rd.
>>>> > T. Nagar
>>>> > Chennai 600017
>>>> > Tamil Nadu, India
>>>> > www.sofist.com
>>>> > ------------------------------------------------------------------
>>>> > StatMax - Your one-stop Statistical solutions
>>>> >
>>>> >
>>>> >
>>>> > On Sun, Apr 11, 2010 at 9:37 PM, Stifu <stifu at free.fr> wrote:
>>>> >
>>>> >>
>>>> >>
>>>> >> satimis wrote:
>>>> >> >
>>>> >> >> Why would you need to create 2 programs, and where does the .dat
>>>> file
>>>> >> >> come into the equation? It'd still be one single program, whether
>>>> >> there
>>>> >> >> is a .dat file or not.
>>>> >> >
>>>> >> > Because some users are running Windows and others Linux. 
>>>> Therefore
>>>> I
>>>> >> need
>>>> >> > 2 programs serving them for the time being.
>>>> >> >
>>>> >>
>>>> >> Mono is cross platform. The same exe will work on Windows and Linux.
>>>> >> That's
>>>> >> one of the main characteristics of Mono, and I thought that was the
>>>> >> reason
>>>> >> you chose to check it out.
>>>> >>
>>>> >>
>>>> >> satimis wrote:
>>>> >> >
>>>> >> > Regarding Java if an program needs JRE (Java Runtime Environment)
>>>> and
>>>> >> it
>>>> >> > can't find it on Windows during execution, it'll ask permission to
>>>> >> > download it on Internet and install it on Windows as well.  Only
>>>> ONCE.
>>>> >> > Should my recollection is correct.  I don't run Windows often only
>>>> for
>>>> >> > testing.  If I'm wrong please correct me.  Thanks.
>>>> >> >
>>>> >> > Will GTK# be the same?
>>>> >> >
>>>> >>
>>>> >> Whether it is Java, .NET or GTK#, it only needs to be installed once
>>>> >> (unless
>>>> >> you need a more recent version than the one installed).
>>>> >>
>>>> >> I guess you should just try this all out, and it'll clear things up
>>>> for
>>>> >> you.
>>>> >> --
>>>> >> View this message in context:
>>>> >>
>>>>
http://n4.nabble.com/Seeking-advice-on-using-monodevelop-to-learn-CSharp-tp1
820057p1836178.html
>>>> >> Sent from the Mono - General mailing list archive at Nabble.com.
>>>> >> _______________________________________________
>>>> >> Mono-list maillist  -  Mono-list at lists.ximian.com
>>>> >> http://lists.ximian.com/mailman/listinfo/mono-list
>>>> >>
>>>> >
>>>> > _______________________________________________
>>>> > Mono-list maillist  -  Mono-list at lists.ximian.com
>>>> > http://lists.ximian.com/mailman/listinfo/mono-list
>>>> >
>>>> >
>>>>
>>>> --
>>>> View this message in context:
>>>>
http://n4.nabble.com/Seeking-advice-on-using-monodevelop-to-learn-CSharp-tp1
820057p1836735.html
>>>> Sent from the Mono - General mailing list archive at Nabble.com.
>>>> _______________________________________________
>>>> Mono-list maillist  -  Mono-list at lists.ximian.com
>>>> http://lists.ximian.com/mailman/listinfo/mono-list
>>>>
>>> 
>>> _______________________________________________
>>> Mono-list maillist  -  Mono-list at lists.ximian.com
>>> http://lists.ximian.com/mailman/listinfo/mono-list
>>> 
>>> 
>> 
>> -- 
>> View this message in context:
>>
http://n4.nabble.com/Seeking-advice-on-using-monodevelop-to-learn-CSharp-tp1
820057p1836896.html
>> Sent from the Mono - General mailing list archive at Nabble.com.
>> _______________________________________________
>> Mono-list maillist  -  Mono-list at lists.ximian.com
>> http://lists.ximian.com/mailman/listinfo/mono-list
>> 
>> 
>> Send instant messages to your online friends
>> http://uk.messenger.yahoo.com 
>> _______________________________________________
>> Mono-list maillist  -  Mono-list at lists.ximian.com
>> http://lists.ximian.com/mailman/listinfo/mono-list
>> 
>> 
> 
> -- 
> View this message in context:
>
http://n4.nabble.com/Seeking-advice-on-using-monodevelop-to-learn-CSharp-tp1
820057p1836933.html
> Sent from the Mono - General mailing list archive at Nabble.com.
> _______________________________________________
> Mono-list maillist  -  Mono-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list
> 
> 
> Send instant messages to your online friends http://uk.messenger.yahoo.com

> _______________________________________________
> Mono-list maillist  -  Mono-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list
> 
> 

-- 
View this message in context:
http://n4.nabble.com/Seeking-advice-on-using-monodevelop-to-learn-CSharp-tp1
820057p1837036.html
Sent from the Mono - General mailing list archive at Nabble.com.


------------------------------

Message: 2
Date: Mon, 12 Apr 2010 08:48:03 -0400
From: Abe Gillespie <abe.gillespie at gmail.com>
Subject: Re: [Mono-list] About converting a program
To: awilliam at whitemice.org
Cc: mono-list at lists.ximian.com
Message-ID:
	<x2sa6d397e31004120548x43090f05m8e0c5a873d307be3 at mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1

Yes, your list of strings has nothing in it (list.Count is 0).  You
just need to debug your program.

-Abe

On Mon, Apr 12, 2010 at 7:38 AM, Adam Tauno Williams
<awilliam at whitemice.org> wrote:
> On Mon, 2010-04-12 at 04:37 -0700, Stephen Liu wrote:
>> Hi Abe,
>> I did that before same as your advice but failed with following warning;
>> Fatal Error System ArgumentOutOfRangeException. ?Argument is out of range
Parameter name: index
>> at System Collections Generic List`1 [System String get_item (int32
index) [0x00000]....
>
> That looks like a straight-up application error to me. ?Take a look at
> the stack trace and your application to see what is supposed to be in
> the List you are accessing. ?Perhaps [most likely?] you are doing some
> filesystem path parsing 'manually' instead of using the appropriate
> methods?
> --
> Adam Tauno Williams <awilliam at whitemice.org>
> Whitemice Consulting
>
> _______________________________________________
> Mono-list maillist ?- ?Mono-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list
>


------------------------------

Message: 3
Date: Mon, 12 Apr 2010 06:46:17 -0800 (PST)
From: Steve Ricketts <velocedge at hotmail.com>
Subject: [Mono-list] Invalid data from CP2102 USB device
To: mono-list at lists.ximian.com
Message-ID: <1271083577407-1837224.post at n4.nabble.com>
Content-Type: text/plain; charset=us-ascii


I tried to use the DataReceived event to read from a CP2102 USB device.  I
found this article http://www.mono-project.com/HowToSystemIOPorts that says
"There is no event notification for received serial data"... which would
explain why the event wasn't firing.  However, it also says that at the time
of writing it's mono 1.2.2.

So, I used BackgroundWorker to set up a thread to continually look at
BytesToRead and grab the data.  It does that ok, but the data is not
correct.  It seems to be consistent, same data every time the same key is
pressed, but not the correct values.  The USB device is an RF receiver that
listens to wireless remote controls.  When I press a button on the wireless
remote, I get the proper packet size (8) but the values are off.  I'll
include an example below with the results from the same device in Windows:

Linux      Windows (correct values)
0 - 255   255
1 - 186   90
2 - 133   5
3 - 213   184
4 - 128   0
5 - 130   2
6 - 128   0
7 - 145   17

Using the same baud rate on Linux that I do with Windows (128000) I get
nothing from the receiver.  Switching to 115200 I get the data but as I
said, it's incorrect.  No other baud rates (I've tried many) give me any
response at all.

So I have the following questions:

1. Has anyone had any similar issues or know what else I could try?   
2. Does anyone know if that limitation has been fixed and is able to trigger
an event when data is received by the device?

sr


-- 
View this message in context:
http://n4.nabble.com/Invalid-data-from-CP2102-USB-device-tp1837224p1837224.h
tml
Sent from the Mono - General mailing list archive at Nabble.com.


------------------------------

Message: 4
Date: Mon, 12 Apr 2010 06:48:57 -0800 (PST)
From: Steve Ricketts <velocedge at hotmail.com>
Subject: [Mono-list] Any way to tell what the valid baud rates are for
	a USB	device?
To: mono-list at lists.ximian.com
Message-ID: <1271083737085-1837229.post at n4.nabble.com>
Content-Type: text/plain; charset=us-ascii


This is related to an earlier post but more of a general question.

I'm working with a CP2102 USB device and am having trouble reading the
correct data.  Changing the baud rate seems to make a difference but I'm not
sure what the valid rates are for this device... so, I'd like to know: (1)
if there is a way to tell what rates are valid or (2) set the device to a
non-standard baud rate.

Thanks,

sr 
-- 
View this message in context:
http://n4.nabble.com/Any-way-to-tell-what-the-valid-baud-rates-are-for-a-USB
-device-tp1837229p1837229.html
Sent from the Mono - General mailing list archive at Nabble.com.


------------------------------

Message: 5
Date: Mon, 12 Apr 2010 07:01:17 -0800 (PST)
From: vtortola <vtortola at gmail.com>
Subject: [Mono-list] I cannot get working Mono with MySql connector
	and the System.Data.Common namespace
To: mono-list at lists.ximian.com
Message-ID: <1271084477685-1837252.post at n4.nabble.com>
Content-Type: text/plain; charset=us-ascii


Hi,

I've a small web project that uses the DbProviderFactories. I've downloaded
the non-install version of the MySql Connector, the dll is copied to the bin
directory correctly.

I've added the configuration to the web.config file:

  <system.data>
      <DbProviderFactories>
        <add name="MySQL Data Provider" invariant="MySql.Data.MySqlClient"
description=".Net Framework Data Provider for MySQL"
             type="MySql.Data.MySqlClient.MySqlClientFactory, MySql.Data,
Version=6.2.3.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d"/>
      </DbProviderFactories>
    </system.data>

It's working in my two windows/.net machines (one for development, and other
for testing in Hyper-V), but I cannot make it work in the machine with
linux/mono, I always get an error that says it cannot find the data
provider.

Should I do something special in Mono for make this work? I've checked
several documents and they don't say anything.

Kind regards.

PS: This is the error:
============================================================================
==
Failed to find or load the registered .Net Framework Data Provider.
Description: HTTP 500. Error processing request.

Stack Trace: 

System.Configuration.ConfigurationErrorsException: Failed to find or load
the registered .Net Framework Data Provider.
  at System.Data.Common.DbProviderFactories.GetFactory (System.Data.DataRow
providerRow) [0x00000] in <filename unknown>:0 
  at System.Data.Common.DbProviderFactories.GetFactory (System.String
providerInvariantName) [0x00000] in <filename unknown>:0 
  at DataKraft.Data.GenericProvider..ctor (System.String providerName,
System.String connectionString) [0x00000] in <filename unknown>:0 
  at DSAS.DtHandler.ProcessRequest (System.Web.HttpContext context)
[0x00000] in <filename unknown>:0  

----------------------------------------------------------------------------
----
Version information: Mono Runtime Version: 2.6.3 (tarball Fri Mar 12
16:17:13 UTC 2010); ASP.NET Version: 2.0.50727.1433 
============================================================================
==

-- 
View this message in context:
http://n4.nabble.com/I-cannot-get-working-Mono-with-MySql-connector-and-the-
System-Data-Common-namespace-tp1837252p1837252.html
Sent from the Mono - General mailing list archive at Nabble.com.


------------------------------

Message: 6
Date: Mon, 12 Apr 2010 17:09:18 +0200
From: Robert Jordan <robertj at gmx.net>
Subject: Re: [Mono-list] I cannot get working Mono with MySql
	connector and the System.Data.Common namespace
To: Mono-list at lists.ximian.com
Message-ID: <hpvd2t$pak$1 at dough.gmane.org>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

On 12.04.2010 17:01, vtortola wrote:
>
> Hi,
>
> I've a small web project that uses the DbProviderFactories. I've
downloaded
> the non-install version of the MySql Connector, the dll is copied to the
bin
> directory correctly.
>
> I've added the configuration to the web.config file:
>
>    <system.data>
>        <DbProviderFactories>
>          <add name="MySQL Data Provider"
invariant="MySql.Data.MySqlClient"
> description=".Net Framework Data Provider for MySQL"
>               type="MySql.Data.MySqlClient.MySqlClientFactory, MySql.Data,
> Version=6.2.3.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d"/>
>        </DbProviderFactories>
>      </system.data>

Check the casing of the MySql.Data.dll on disk. Don't forget that
Linux is case sensitive.

For some brain-dead reasons, the ZIP file containing the connector for
Mono is containing lower-case files.

Robert




------------------------------

_______________________________________________
Mono-list mailing list
Mono-list at lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


End of Mono-list Digest, Vol 60, Issue 18
*****************************************



More information about the Mono-list mailing list