Bug 17745 - Incorrect CS0103 error for types in different namespace
Summary: Incorrect CS0103 error for types in different namespace
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: C# Binding ()
Version: unspecified
Hardware: PC Mac OS
: Normal normal
Target Milestone: master
Assignee: Mike Krüger
Depends on:
Reported: 2014-02-13 07:52 UTC by Marek Safar
Modified: 2014-04-01 11:18 UTC (History)
3 users (show)

Is this bug a regression?: ---
Last known good build:

CS01030 error (30.35 KB, image/png)
2014-02-25 11:51 UTC, Stephen Shaw
Can't find System.Linq or System.Linq.Expression (25.13 KB, image/png)
2014-02-25 11:52 UTC, Stephen Shaw

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Marek Safar 2014-02-13 07:52:35 UTC
This is from mono/mcs/mcs/mcs.csproj project

Comment 1 Mike Krüger 2014-02-13 08:05:56 UTC
Seems to be that you've opened that file without project - somehow.

Can you give a step by step repro how did you do that ?
Comment 2 Marek Safar 2014-02-13 08:07:52 UTC
XS opened that file during debugging.
Comment 3 Mike Krüger 2014-02-13 08:09:16 UTC
Can you reproduce that ?
Comment 4 Mike Krüger 2014-02-13 08:09:34 UTC
btw. did you have the project open ?
Comment 5 Stephen Shaw 2014-02-25 11:50:59 UTC
I'm running into a similar problem. The file I have open is in a project.

In my case its not recognizing System.'Linq' or System.'Linq.Expression'. I've attached an image.

I do have a reference to System.Core and if I open it in the assembly browser both namespaces show up.
Comment 6 Stephen Shaw 2014-02-25 11:51:26 UTC
Created attachment 6139 [details]
CS01030 error
Comment 7 Stephen Shaw 2014-02-25 11:52:12 UTC
Created attachment 6140 [details]
Can't find System.Linq or System.Linq.Expression
Comment 9 Stephen Shaw 2014-02-25 12:15:37 UTC
If I open the file outside of a project I don't get highlighting, but I also don't get the cs0103 error.
Comment 10 Mike Krüger 2014-02-26 04:06:34 UTC
fixed the bug from stephen shaw.
Comment 11 Stephen Shaw 2014-02-26 08:45:48 UTC
Comment 12 Ram Chandra 2014-04-01 11:18:35 UTC
I have checked this issue on following builds:

Mac OS X 10.7.5
Xamarin Studio: 4.2.4 (build 266)

Build Information
Release ID: 402040266
Git revision: 57fa6b7639703775ae1d5c46536e42ab424cb177
Build date: 2014-03-20 12:34:27-04
Xamarin addins: eee141c29724a19529e77b8e743086d95b29f5ba

I observed that when I hover curser over the "Expression" class ( without using "System.Linq.Expression" namspace) it shows "error cs0103" and when I add the "using System.Linq.Expressions;" namespace it removes the error and shows definition of the "Expression" class (as expected).

Now intellisense of XS also display "Linq" after the "System" namespace.

screencast: http://www.screencast.com/t/qUkciYg12l

This issue is working fine. Hence, I am closing this issue.