[help a mono newbie

View: New views
6 Messages — Rating Filter:   Alert me  

[help a mono newbie

by jam1jam1 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

[Task:File=/home/james/Projects/asdf2/asdf2/Main.cs, Line=12, Column=25, Type=Error, Priority=Normal, Description=The type or namespace name `IEnurmerable`1' could not be found. Are you missing a using directive or an assembly reference?(CS0246)]

Can anyone tell me how to add assembly reference to a mono solution?I am trying to use system.linq to write the following prog
using System;
using System.Linq;

    namespace asdf2
{
   
    class MainClass
    {
        string[] names = {"Tom","Dick","Harry","Mrk","Sebastian"};
        public static void Main(string[] args)
        {
            IEnurmerable<string> query =
                from n in names
                let vowelless = Regex.Replace(n,"[,a,e,i,o,u]","")
                where vowelless.Length > 2
                orderby vowelless
                select n + " - " + vowelless;
            Console.WriteLine(vowelless);
                    }
    }
}

_______________________________________________
Monodevelop-list mailing list
Monodevelop-list@...
http://lists.ximian.com/mailman/listinfo/monodevelop-list

Re: [help a mono newbie

by Petit Eric :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

In Monodevelop, in treeview of the solution, make a Right lick on the "References" folder (where assembly are inside) and then click the add reference item


2009/11/4 james goforth <jamgof08@...>
[Task:File=/home/james/Projects/asdf2/asdf2/Main.cs, Line=12, Column=25, Type=Error, Priority=Normal, Description=The type or namespace name `IEnurmerable`1' could not be found. Are you missing a using directive or an assembly reference?(CS0246)]

Can anyone tell me how to add assembly reference to a mono solution?I am trying to use system.linq to write the following prog
using System;
using System.Linq;

    namespace asdf2
{
   
    class MainClass
    {
        string[] names = {"Tom","Dick","Harry","Mrk","Sebastian"};
        public static void Main(string[] args)
        {
            IEnurmerable<string> query =
                from n in names
                let vowelless = Regex.Replace(n,"[,a,e,i,o,u]","")
                where vowelless.Length > 2
                orderby vowelless
                select n + " - " + vowelless;
            Console.WriteLine(vowelless);
                    }
    }
}

_______________________________________________
Monodevelop-list mailing list
Monodevelop-list@...
http://lists.ximian.com/mailman/listinfo/monodevelop-list




--
Cordially.

Small Eric Quotations of the days:
---------------------------------------------------------------------------
I have no special talents. I am only passionately curious
Sent from Paris, France
_______________________________________________
Monodevelop-list mailing list
Monodevelop-list@...
http://lists.ximian.com/mailman/listinfo/monodevelop-list

Re: [help a mono newbie

by Daniel Soto-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

You need add a reference to System.Core in monodevelop to do a linq query to object.

2009/11/4 james goforth <jamgof08@...>
[Task:File=/home/james/Projects/asdf2/asdf2/Main.cs, Line=12, Column=25, Type=Error, Priority=Normal, Description=The type or namespace name `IEnurmerable`1' could not be found. Are you missing a using directive or an assembly reference?(CS0246)]

Can anyone tell me how to add assembly reference to a mono solution?I am trying to use system.linq to write the following prog
using System;
using System.Linq;

    namespace asdf2
{
   
    class MainClass
    {
        string[] names = {"Tom","Dick","Harry","Mrk","Sebastian"};
        public static void Main(string[] args)
        {
            IEnurmerable<string> query =
                from n in names
                let vowelless = Regex.Replace(n,"[,a,e,i,o,u]","")
                where vowelless.Length > 2
                orderby vowelless
                select n + " - " + vowelless;
            Console.WriteLine(vowelless);
                    }
    }
}

_______________________________________________
Monodevelop-list mailing list
Monodevelop-list@...
http://lists.ximian.com/mailman/listinfo/monodevelop-list



_______________________________________________
Monodevelop-list mailing list
Monodevelop-list@...
http://lists.ximian.com/mailman/listinfo/monodevelop-list

Re: [help a mono newbie

by Daniel Soto-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Also, you need to target .NET/Mono 3.5 in project properties.

2009/11/4 james goforth <jamgof08@...>
[Task:File=/home/james/Projects/asdf2/asdf2/Main.cs, Line=12, Column=25, Type=Error, Priority=Normal, Description=The type or namespace name `IEnurmerable`1' could not be found. Are you missing a using directive or an assembly reference?(CS0246)]

Can anyone tell me how to add assembly reference to a mono solution?I am trying to use system.linq to write the following prog
using System;
using System.Linq;

    namespace asdf2
{
   
    class MainClass
    {
        string[] names = {"Tom","Dick","Harry","Mrk","Sebastian"};
        public static void Main(string[] args)
        {
            IEnurmerable<string> query =
                from n in names
                let vowelless = Regex.Replace(n,"[,a,e,i,o,u]","")
                where vowelless.Length > 2
                orderby vowelless
                select n + " - " + vowelless;
            Console.WriteLine(vowelless);
                    }
    }
}

_______________________________________________
Monodevelop-list mailing list
Monodevelop-list@...
http://lists.ximian.com/mailman/listinfo/monodevelop-list



_______________________________________________
Monodevelop-list mailing list
Monodevelop-list@...
http://lists.ximian.com/mailman/listinfo/monodevelop-list

Parent Message unknown Re: [help a mono newbie

by Olivier Dagenais-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

It looks like you need to add:

using System.Collections.Generic;

...at the top of your file, since that's where the generic version of
IEnumerable is found.

Also, you can try a web search for the error code at the end of the
message (in parenthesis - in this case it's "CS0246").  The
documentation from Microsoft is pretty good.

- Oli

>  Date: Wed, 4 Nov 2009 13:47:15 -0500
>  From: james goforth <jamgof08@...>
>  Subject: [MonoDevelop] [help a mono newbie
>  To: monodevelop list <monodevelop-list@...>
>
>  [Task:File=/home/james/Projects/asdf2/asdf2/Main.cs, Line=12, Column=25,
>  Type=Error, Priority=Normal, Description=The type or namespace name
>  `IEnurmerable`1' could not be found. Are you missing a using directive or an
>  assembly reference?(CS0246)]
>
>  Can anyone tell me how to add assembly reference to a mono solution?I am
>  trying to use system.linq to write the following prog
>  using System;
>  using System.Linq;
>
>     namespace asdf2
>  {
>
>     class MainClass
>     {
>         string[] names = {"Tom","Dick","Harry","Mrk","Sebastian"};
>         public static void Main(string[] args)
>         {
>             IEnurmerable<string> query =
>                 from n in names
>                 let vowelless = Regex.Replace(n,"[,a,e,i,o,u]","")
>                 where vowelless.Length > 2
>                 orderby vowelless
>                 select n + " - " + vowelless;
>             Console.WriteLine(vowelless);
>                     }
>     }
>  }
_______________________________________________
Monodevelop-list mailing list
Monodevelop-list@...
http://lists.ximian.com/mailman/listinfo/monodevelop-list

Re: [help a mono newbie

by Michael Hutchinson :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Wed, Nov 4, 2009 at 1:47 PM, james goforth <jamgof08@...> wrote:

> [Task:File=/home/james/Projects/asdf2/asdf2/Main.cs, Line=12, Column=25,
> Type=Error, Priority=Normal, Description=The type or namespace name
> `IEnurmerable`1' could not be found. Are you missing a using directive or an
> assembly reference?(CS0246)]
>
> Can anyone tell me how to add assembly reference to a mono solution?I am
> trying to use system.linq to write the following prog
> using System;
> using System.Linq;
>
>     namespace asdf2
> {
>
>     class MainClass
>     {
>         string[] names = {"Tom","Dick","Harry","Mrk","Sebastian"};
>         public static void Main(string[] args)
>         {
>             IEnurmerable<string> query =
>                 from n in names
>                 let vowelless = Regex.Replace(n,"[,a,e,i,o,u]","")
>                 where vowelless.Length > 2
>                 orderby vowelless
>                 select n + " - " + vowelless;
>             Console.WriteLine(vowelless);
>                     }
>     }
> }

Summary from other messages of the things you need to do:

1. Add "using System.Collections.Generic;" to the top of the file,
since that's the namespace IEnumerable<T> is in.
2. Make sure you have a reference to "System" using the "edit
references" dialog - right-click on the "references" folder in the
project tree.
3. Double-check that the target framework is 3.5
4. Add a reference to "System.Core" because this is needed for
System.Linq and the LINQ queries.
5. Fix the type name - it's "IEnumerable", not "IEnurmerable" :-)

Steps 3 & 4 shouldn't be necessary, because those are the defaults in
MD 2.1+, but it's worth checking just in case.

Note that you can also use "var query = from ..." instead of
specifying the type explicitly.

--
Michael Hutchinson
http://mjhutchinson.com
_______________________________________________
Monodevelop-list mailing list
Monodevelop-list@...
http://lists.ximian.com/mailman/listinfo/monodevelop-list