Bug 59557 - [Xcode9][VS 2015][Sample]Getting syntax errors while building iOS 11 Samples in VS 2015.
Summary: [Xcode9][VS 2015][Sample]Getting syntax errors while building iOS 11 Samples ...
Status: RESOLVED NOT_REPRODUCIBLE
Alias: None
Product: iOS
Classification: Xamarin
Component: Samples ()
Version: XI 10.99 (xcode9)
Hardware: PC Windows
: Normal normal
Target Milestone: Xcode9
Assignee: CraigD
URL:
Depends on:
Blocks:
 
Reported: 2017-09-18 13:48 UTC by Saurabh Paunikar
Modified: 2018-03-22 12:58 UTC (History)
6 users (show)

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


Attachments
Attached IDE logs (1.36 KB, application/x-zip-compressed)
2017-09-18 13:48 UTC, Saurabh Paunikar
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 NOT_REPRODUCIBLE

Description Saurabh Paunikar 2017-09-18 13:48:20 UTC
Created attachment 24794 [details]
Attached IDE logs

Getting syntax errors while building iOS 11 Samples in VS 2015.

I am trying to build iOS 11 Samples (CoreML, CoreMLVision, DragandDropCollectionView, DragandDropDragBoard, DragandDropCustomView) but getting syntax errors while build samples.

Issue Observed on Samples :

CoreML, CoreMLVision, DragandDropCollectionView, DragandDropDragBoard, DragandDropCustomView samples

Sample Link : https://github.com/xamarin/ios-samples/tree/master/ios11/

=================================================================================

Environment info : 
Executed on

Microsoft Visual Studio Enterprise 2015
Version 14.0.25431.01 Update 3
Microsoft .NET Framework
Version 4.7.02053

Installed Version: Enterprise

Xamarin   4.7.9.45 (bd7e3753c)

Xamarin.Android   7.4.5.1 (fb018c5)

Xamarin.iOS   11.0.0.0 (152b654)

Xcode 9 GM


Detailed Environment info:
https://gist.github.com/SumantaWelekar/85f915afd5d0c0e6fe1db2b2f05f7713

==================================================================================

Steps to Reproduce :

1. Open any of the Above mentioned Sample.
2. Build the Sample.

Expected Result : Sample should build successfully.

Actual Result : Syntax error observed while building sample.

====================================================================================

Screencast link :https://www.screencast.com/t/6vL7HaAy


====================================================================================

Testsuite  link : https://testrail.xamarin.com/index.php?/runs/view/52129&group_by=cases:section_id&group_order=asc&group_id=339735

Test case link : https://testrail.xamarin.com/index.php?/tests/view/19180866&group_by=cases:section_id&group_order=asc&group_id=339735

Reproducible : 100%

====================================================================================

Attaching IDE Logs
Comment 2 Sebastien Pouliot 2017-09-18 18:05:39 UTC
Please attach the build logs (there's nothing useful in your attachment) and/or paste the errors inside the comments.
Comment 3 GouriKumari 2017-09-18 19:00:26 UTC
I could successfully build the samples Drag And Drop Custom View and Drag and Drop TableView with device and simulator config.

## Build Log for Custom View: https://gist.github.com/GouriKumari/4db873166d30fd24c84352f02769665d

## Test Env:
https://gist.github.com/GouriKumari/c3021779719f0a41b3de91f2884a8b95
Comment 4 GouriKumari 2017-09-18 19:25:43 UTC
Update: I could reproduce this issue with CoreMLVision sample. This seems to be an issue caused by usage of C#7.0 in VS2015.

##Build Log: https://gist.github.com/GouriKumari/b7bbc67dc2152529a8dbe75f6ad81cf5

Samples need to be updated to work on both VS2015 and VS2017.
Comment 5 CraigD 2017-09-19 00:12:01 UTC
Some of these are C# 6.0 features, released in 2015, so they should be fine, for example, the `out` keyword in a method call:


`GetPrediction(inputFp, out var err2);`

The actual build errors from the IDE would be much more useful than the entire build log in this case. I will investigate if any of these are actually C#7 features, but C#6 I think should be acceptable?
Comment 6 GouriKumari 2017-09-19 16:05:58 UTC
Specific error:
C:\Users\gourik\Downloads\CoreMLImageRecognition\CoreMLImageRecognition\MachineLearningModel.cs(77,46,77,49): error CS1003: Syntax error, ',' expected
1>C:\Users\gourik\Downloads\CoreMLImageRecognition\CoreMLImageRecognition\MachineLearningModel.cs(99,66,99,71): error CS1003: Syntax error, ',' expected
1>C:\Users\gourik\Downloads\CoreMLImageRecognition\CoreMLImageRecognition\MachineLearningModel.cs(105,59,105,63): error CS1003: Syntax error, ',' expected

I was referring to defining variable with 'out' keyword. I think this is a c#7.0 feature. Also, these samples  work with VS2017.
Comment 7 CraigD 2017-09-20 21:05:11 UTC
I think we've fixed all of these in commit

https://github.com/xamarin/ios-samples/commit/381ea7aaa8ade8d702c49a52d4618d96ddb134a0

Hopefully we can resolve after re-testing.
Comment 8 Mykyta Bondarenko 2018-03-06 13:41:39 UTC
All next samples build successfully with VS17:
- CoreML, 
- CoreMLVision, 
- DragandDropCollectionView, 
- DragandDropDragBoard, 
- DragandDropCustomView 
- CoreMLImageRecognition

VS17 - https://gist.github.com/mykyta-bondarenko-gl/a68fd2a840aed0612567ff89b2b12a8d