Error CS0518: Predefined type ‘System.Object’ is not defined or imported

July 15, 2009


Today I got a strange error.

Error CS0518: Predefined type ‘System.Object’ is not defined or imported

Strangely, all nant related tasks just work as accepted.

After a little googling i’ve found a solution here, that says that i need to reference mscorlib. I did that and the error was gone.

Then I opened my project preferences and saw that a checkbox was check, which told not to reference mscorlib. After unchecking the checkbox, the day was saved.

do not reference mscorlib

The screenshot shows preferences in SharpDevelop 3.1

Advertisements

One Response to “Error CS0518: Predefined type ‘System.Object’ is not defined or imported”

  1. Pedro said

    thanks, in VS is the same option but in another place

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: