Bug 34922 - [RC] Compiler not using System.Core when using System.Linq
Summary: [RC] Compiler not using System.Core when using System.Linq
Status: NEW
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Project Model ()
Version: unspecified
Hardware: Macintosh Mac OS
: Normal minor
Target Milestone: master
Assignee: Lluis Sanchez
URL:
Depends on:
Blocks:
 
Reported: 2015-10-15 18:45 UTC by James
Modified: 2016-07-15 01:17 UTC (History)
2 users (show)

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


Attachments
Sample Project (57.51 KB, application/zip)
2015-10-15 18:45 UTC, James
Details


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 for Bug 34922 on Developer Community or GitHub if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: Developer Community HTML or GitHub Markdown
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:
Status:
NEW

Description James 2015-10-15 18:45:53 UTC
Created attachment 13354 [details]
Sample Project

Currently there is a difference in experience between VS and XS when compiling using System.Linq. If you do not have a reference to System.Core in your application, it still compiles and runs fine in Xamarin Studio, but in Visual Studio it will throw errors as it cannot find System.Linq (as it is part of System.Core). I am not sure what is going on under the hood, but the lack of parity can be confusing.

Steps to reproduce
1. Create a new solution in Xamarin Studio, add a simple LINQ statement over a collection
e.g
nums = new List<int> (){ 3, 44, 12,64,3,1,96, 7, 5};
var res = nums.Average ()+"";

2. Compile, all works fine.
3. Remove System.Core and compile, still everything works (and runs)
4. Open in Visual Studio -> Does not compile.

Admittedly this is likely a minor issue, but a customer recently ran into this as the reference somehow got removed at some point while trying to clean up the project.

=== Xamarin Studio ===

Version 5.10 (build 811)
Installation UUID: ab4225ca-dc7f-4d1a-b95e-550f08c30019
Runtime:
	Mono 4.2.1 (explicit/804ddbc)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 402010060

=== Xamarin.Profiler ===

Version: 0.22.0.0
Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler

=== Xamarin.Android ===

Version: 6.0.0.8 (Business Edition)
Android SDK: /Users/jamesw/Library/Developer/Xamarin/android-sdk-macosx
	Supported Android versions:
		2.3    (API level 10)
		4.0.3  (API level 15)
		4.1    (API level 16)
		4.3    (API level 18)
		4.4    (API level 19)
		4.4.87 (API level 20)
		5.0    (API level 21)
		5.1    (API level 22)
		6.0    (API level 23)

SDK Tools Version: 24.3.4
SDK Platform Tools Version: 23.0.1
SDK Build Tools Version: 22.0.1

Java SDK: /usr
java version "1.7.0_71"
Java(TM) SE Runtime Environment (build 1.7.0_71-b14)
Java HotSpot(TM) 64-Bit Server VM (build 24.71-b01, mixed mode)

=== Xamarin Android Player ===

Version: 0.6.2
Location: /Applications/Xamarin Android Player.app

=== Apple Developer Tools ===

Xcode 7.0.1 (8228)
Build 7A1001

=== Xamarin.Mac ===

Version: 2.4.0.79 (Business Edition)

=== Xamarin.iOS ===

Version: 9.2.0.84 (Business Edition)
Hash: b5396c2
Branch: master
Build date: 2015-09-30 15:22:15-0400

=== Build Information ===

Release ID: 510000811
Git revision: 34cd31ea72536afab530c14d9220b286075e83cd
Build date: 2015-09-30 10:40:37-04
Xamarin addins: 8e6fccfc0c19a7e0b7b11be925f09751d827eb5c
Build lane: monodevelop-lion-cycle6

=== Operating System ===

Mac OS X 10.10.5
Darwin jWhite-Mac.local 14.5.0 Darwin Kernel Version 14.5.0
    Wed Jul 29 02:26:53 PDT 2015
    root:xnu-2782.40.9~1/RELEASE_X86_64 x86_64

-- Windows / Visual Studio --
Windows 10

Microsoft Visual Studio Enterprise 2015
Version 14.0.23107.0 D14REL
Microsoft .NET Framework
Version 4.6.00079

Installed Version: Enterprise

Xamarin   4.0.0.1566 (5abb0de)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin.Android   6.0.0.11 (f94dc5b)
Visual Studio plugin to enable development for Xamarin.Android.

Xamarin.iOS   9.2.0.84 (b5396c2)
Visual Studio extension to enable development for Xamarin.iOS.