Bug 33846 - C# 6 features do not work on Windows
Summary: C# 6 features do not work on Windows
Status: RESOLVED DUPLICATE of bug 32494
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: General ()
Version: 5.9
Hardware: PC Mac OS
: Normal normal
Target Milestone: C6SR1
Assignee: Bugzilla
URL:
: 35474 ()
Depends on:
Blocks:
 
Reported: 2015-09-10 10:58 UTC by John Miller [MSFT]
Modified: 2015-11-03 10:51 UTC (History)
5 users (show)

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


Attachments
Test Case (12.01 KB, application/zip)
2015-09-10 10:58 UTC, John Miller [MSFT]
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 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:
Status:
RESOLVED DUPLICATE of bug 32494

Description John Miller [MSFT] 2015-09-10 10:58:47 UTC
Created attachment 12856 [details]
Test Case

**Overview:**

   C# 6.0 features are not compiling in Xamarin Studio on Windows, even with VS 2015 Build tools / VS 2015 installed on that Windows machine. 
   Our docs and release notes state that C# 6.0 is supported in 5.9

   https://developer.xamarin.com/guides/cross-platform/advanced/csharp_six/
   https://developer.xamarin.com/releases/studio/xamarin.studio_5.9/xamarin.studio_5.9/#Partial_C_6_Support

**Steps to Reproduce:**

   1. Run the attached sample in Xamarin Studio on Windows. 

**Actual Results:**

   The build fails because the lambda syntax for the method is not recognized. 

**Expected Results:**

   The project should compile. 

**Build Date & Platform:**

   === Xamarin Studio ===

Version 5.9.5 (build 10)
Installation UUID: 8e220e9a-2ce4-4f93-9699-89959af97459
Runtime:
	Microsoft .NET 4.0.30319.34014
	GTK+ 2.24.22 (MS-Windows theme)
	GTK# 2.12.26

=== Xamarin.Android ===

Version: 5.1.5 (Business Edition)
Android SDK: C:\Users\johnmiller\AppData\Local\Android\android-sdk
	Supported Android versions:
		2.3   (API level 10)
		4.0.3 (API level 15)
		4.4   (API level 19)
		5.0   (API level 21)
Java SDK: C:\Program Files (x86)\Java\jdk1.7.0_71
java version "1.7.0_71"
Java(TM) SE Runtime Environment (build 1.7.0_71-b14)
Java HotSpot(TM) Client VM (build 24.71-b01, mixed mode, sharing)

=== Xamarin Android Player ===

Not Installed

=== Build Information ===

Release ID: 509050010
Git revision: 48d16bc4f12ce3938964fc7c3d72fdc6887ad4ad
Build date: 2015-08-18 16:53:58-04
Xamarin addins: c2d51b360ad9f59e689046d47030df27de28f94a

=== Operating System ===

Windows 6.2.9200.0 (64-bit)

**Workaround:**

   Following the advice of this post, https://forums.xamarin.com/discussion/comment/130391/#Comment_130391

Add this to the .csproj file:
<PropertyGroup Condition="'$(Platform)' != 'Unix'">
  <CscToolPath>$(MSBuildProgramFiles32)\MSBuild\14.0\Bin</CscToolPath>
</PropertyGroup>
Comment 1 Abhishek 2015-09-10 12:30:42 UTC
I have tried this issue and able to reproduce the reported behavior at my end.

Steps To Reproduce:
1.Download the sample given in the Description.
2.Open the Sample project on XS.
3.Build the application.
4.It does give the error.

Screencast:http://www.screencast.com/t/eHmeD8FFLp
Build Output: https://gist.github.com/Abhishekk360/b6a426afb79a305d7c8c
Ide Log: https://gist.github.com/Abhishekk360/42fa62c1b99e2571c3b5

As per Workaround describe in description this issue does not give any build error and build successfully.Here is the screencast for the same:
http://www.screencast.com/t/jTkh1yP32YLF

Environment Info:

=== Xamarin Studio ===

Version 5.9.6 (build 26)
Installation UUID: 9964a087-9af9-4da0-aa20-07ca4b85f306
Runtime:
	Microsoft .NET 4.0.30319.42000
	GTK+ 2.24.22 (MS-Windows theme)
	GTK# 2.12.26

=== Xamarin.Android ===

Version: 5.1.6 (Enterprise Edition)
Android SDK: D:\android-sdk
	Supported Android versions:
		2.3    (API level 10)
		4.0.3  (API level 15)
		4.1    (API level 16)
		4.2    (API level 17)
		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)
Java SDK: C:\Program Files (x86)\Java\jdk1.7.0_71
java version "1.7.0_71"
Java(TM) SE Runtime Environment (build 1.7.0_71-b14)
Java HotSpot(TM) Client VM (build 24.71-b01, mixed mode, sharing)

=== Xamarin Android Player ===

Version: 0.5.6
Location: C:\Program Files\Xamarin Android Player\DeviceManager.exe

=== Build Information ===

Release ID: 509060026
Git revision: 031075e25277828f9e74a37906e46818286ec615
Build date: 2015-09-03 12:02:19-04
Xamarin addins: 04612007b3d767c051c04c81df1d5bf03b6d7946

=== Operating System ===

Windows 6.1.7601.65536 (64-bit)
Comment 3 Lluis Sanchez 2015-11-03 06:53:39 UTC
*** Bug 35474 has been marked as a duplicate of this bug. ***
Comment 4 Lluis Sanchez 2015-11-03 10:51:35 UTC

*** This bug has been marked as a duplicate of bug 32494 ***