Mono: type name or namespace "HashSet" not found

Sorry if my question is absolutely stupid, but I just installed the latest versions of Mono (2.10.1) and MonoDevelop on Mac OS X 10.5, and this small piece of code does not compile

using System; using System.Collections.Generic; namespace Tests { class MainClass { public static void Main (string[] args) { HashSet<int> set = new HashSet<int>(); Console.WriteLine("set.Add(5)={0}", set.Add(5)); } } } 

I get the error mentioned in the header when I compile ... My project settings say that I am using Mono / .NET 3.5 ...

What can i forget?

+7
source share
1 answer

I just reproduced this on Monodevelop 2.4 (32 bit linux with mono 2.6.7).

This is mistake

https://bugzilla.novell.com/show_bug.cgi?id=666944

Fix

Change links to include "System.Core" (3.5) Now it compiles OK!


This is not a problem in Monodevelop 2.6 (tested with mono-2.10, 32-bit Linux)

+8
source

All Articles