Results 1 to 12 of 12

Thread: Mono questions

  1. #1

    Thread Starter
    Hyperactive Member BramVandenbon's Avatar
    Join Date
    Jan 2002
    Location
    Belgium
    Posts
    502

    Mono questions

    Hi,

    Somebody running Windows XP Prof. complained that he could not get my exe files running and had a error telling him that the .NET framework was not installed. That's actually the first time this occured to me. Am I supposed to let everybody with Windows XP that wants to run my application download and install the .NET framework? I thought this was installed by default.

    Because I wanted to make my program crossplatform anyway I figured that maybe mono could be the solution for both problems. If my projects are compiled with mono I can simply ask the users to download and install the (smaller) mono runtimes instead of the .NET framework. Correct?

    Another question: I am capable of compiling .cs-files with mono so far, but can it also compile a complete solution instead of just 1 file. I tried but without succes so far:
    C:\Documents and Settings\Bram Vandenbon\Mijn documenten\Visual Studio 2005\Projects\WindowsApplication3\WindowsApplication3>mcs WindowsApplication3.csproj
    WindowsApplication3.csproj(1,1): error CS8025: Parsing error Compilation failed: 1 error(s), 0 warnings
    While we are at it, does mono have problems compiling applications with GUI-components ?

    Somebody at another forum told me that porting from Visual Studio to Mono is something that is still in an experimental phase. Is that correct? (I hope not)

    Thanks for all replies, in advance
    Bram Vandenbon
    ____________________________________________

    Please rate my messages. Thank you!
    ____________________________________________
    Bram Vandenbon
    http://www.bramvandenbon.com

  2. #2
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: Mono questions

    1. Not everyone will have the .NET framework and Windows XP doesn't come with .NET framework by default. It is an option with Windows Update. An option. If you are totally unsure about this, you can go ahead and include the framework in your installer. Look up bootstrap installers. Or you can simply give them a link to the framework if you don't want to increase the size of your MSI.

    2. Yes, quite experimental, since not everything will work. A simple application should work, but with increasing interdependency and complexity, the lower your chances of it working on the mono framework. Your best bet is to have a machine setup on which you can try to run it, eliminating one problem at a time.

  3. #3

    Thread Starter
    Hyperactive Member BramVandenbon's Avatar
    Join Date
    Jan 2002
    Location
    Belgium
    Posts
    502

    Re: Mono questions

    thanks mendhak.

    Those Visual Studio 2005 installers really are super. I set it to download the framework when not installed.

    About "mono", I'll let it rest for a while. There are more important things than being crossplatform anyway. What's the marketshare of mac and linux anyway... ? ;-p.
    ____________________________________________

    Please rate my messages. Thank you!
    ____________________________________________
    Bram Vandenbon
    http://www.bramvandenbon.com

  4. #4
    PowerPoster sunburnt's Avatar
    Join Date
    Feb 2001
    Location
    Boulder, Colorado
    Posts
    1,403

    Re: Mono questions

    mono doesn't understand visual studio project files -- it's just a compiler. On *nix systems, you would use a Makefile. On windows, you could create a .bat file or type all the commands yourself.

    In fact, try giving the microsoft c# compiler (csc.exe in your .NET directory) a project file -- I doubt that it will compile anything either. The IDE just feeds the correct arguments to csc.exe to compile your solution.
    Every passing hour brings the Solar System forty-three thousand miles closer to Globular Cluster M13 in Hercules -- and still there are some misfits who insist that there is no such thing as progress.

  5. #5
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: Mono questions

    You can open the csproj file in a text editor and find out all the information, references and all that stuf you need.

    On the other hand, msbuild.exe does work with CSPROJ files.

  6. #6

    Thread Starter
    Hyperactive Member BramVandenbon's Avatar
    Join Date
    Jan 2002
    Location
    Belgium
    Posts
    502

    Re: Mono questions

    Quote Originally Posted by sunburnt
    mono doesn't understand visual studio project files -- it's just a compiler. On *nix systems, you would use a Makefile. On windows, you could create a .bat file or type all the commands yourself.
    I don't think I can make a bat file capable of compiling it. Because the cs files contain references to eachother.

    For example:
    When class 1 uses class 2 and class 2 uses class 1. Which one should I compile first?

    AHA!! Oh, i'll try concatenating all files to one file. Maybe then it will work I'll let you know if it works.
    ____________________________________________

    Please rate my messages. Thank you!
    ____________________________________________
    Bram Vandenbon
    http://www.bramvandenbon.com

  7. #7
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: Mono questions

    Quote Originally Posted by BramVandenbon
    When class 1 uses class 2 and class 2 uses class 1. Which one should I compile first?
    If you ever come across that sort of a situation, you should reconsider your architecture.

  8. #8
    PowerPoster sunburnt's Avatar
    Join Date
    Feb 2001
    Location
    Boulder, Colorado
    Posts
    1,403

    Re: Mono questions

    You can pass more than one .cs file to csc.exe at once. For example, if my project.exe contains main.cs, io.cs, and foo.cs, and requires SWF and System.Drawing, I can say:

    Code:
    csc.exe main.cs io.cs foo.cs /target:winexe /out:project.exe /reference:System.Windows.Forms.dll;System.Drawing.dll
    This page lists all the options that csc will take over the command line.
    Every passing hour brings the Solar System forty-three thousand miles closer to Globular Cluster M13 in Hercules -- and still there are some misfits who insist that there is no such thing as progress.

  9. #9
    Fanatic Member
    Join Date
    Jan 2005
    Location
    Cebu
    Posts
    607

    Re: Mono questions

    There's a port to a popular build system for Java to .Net called NAnt.

    http://nant.sourceforge.net/

  10. #10
    type Woss is new Grumpy; wossname's Avatar
    Join Date
    Aug 2002
    Location
    #!/bin/bash
    Posts
    5,682

    Re: Mono questions

    I've used mono a lot lately. The comments about makefiles are correct and it can theoretically handle a project of any complexity. GUI items are no trouble, but you'll need a GUI designer (monodevelop) to actually make anything good unless you want to hand-code buttons and labels (not my idea of fun).

    I didn't even realise that Mono was available for windows, have you got a link for that?

    Its still kind of experimental from what I understand, it doesn't support .net 2.0 fully (although there is a compiler option to turn on some 2.0 features).

    I suggest you check out the man page for MCS and mono...

    $ man mono

    $ man mcs
    I don't live here any more.

  11. #11
    Fanatic Member
    Join Date
    Jan 2005
    Location
    Cebu
    Posts
    607

    Re: Mono questions

    Actually it has a framework that works on Windows but never got a change to see MonoDevelop running on Windows.

    http://www.mono-project.com/Downloads

  12. #12
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594

    Re: Mono questions

    gmcs claims to implement all of C# 2.0.

    "Porting" from VS-developed apps to Mono consists mainly of the following:
    1) Making sure there are no P/Invokes. Those work slightly differently in Mono, and anyway, you've no guarantee that the DLL is available elsewhere, especially not on the multitude of platforms Mono runs on.
    2) Making sure you don't use unsupported parts of the framework. You can see what is supported here:
    http://www.mono-project.com/Class_Status
    Especially critical components are System.Management, System.Messaging and System.ServiceProcess. There's lots missing there.
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width