Bug 30857 - New F# Projects templates have extra Main definitions
Summary: New F# Projects templates have extra Main definitions
Status: RESOLVED FIXED
Alias: None
Product: iOS
Classification: Xamarin
Component: Tools ()
Version: XI 8.10
Hardware: PC Mac OS
: Normal normal
Target Milestone: Untriaged
Assignee: Vincent Dondain [MSFT]
URL:
Depends on:
Blocks:
 
Reported: 2015-06-05 15:39 UTC by Frank A. Krueger
Modified: 2015-06-24 10:30 UTC (History)
3 users (show)

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

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 FIXED

Description Frank A. Krueger 2015-06-05 15:39:24 UTC
Repro:

1. File New iOS F# Empty Project
2. Build

Errors because AppDelegate.fs and Main.fs both have entry points.

=== Xamarin Studio ===

Version 5.9.3 (build 1)
Installation UUID: e51e2705-c52a-4ae8-aa07-c481d6ab8a7a
Runtime:
	Mono 4.0.1 ((detached/ed1d3ec)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 400010044

=== Apple Developer Tools ===

Xcode 6.3.1 (7703)
Build 6D1002

=== Xamarin.iOS ===

Version: 8.10.1.64 (Enterprise Edition)
Hash: e6ebd18
Branch: master
Build date: 2015-05-21 21:55:09-0400

=== Xamarin.Android ===

Version: 5.1.3.1 (Enterprise Edition)
Android SDK: /Users/fak/Library/Developer/Xamarin/android-sdk-mac_x86
	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: /usr
java version "1.7.0_51"
Java(TM) SE Runtime Environment (build 1.7.0_51-b13)
Java HotSpot(TM) 64-Bit Server VM (build 24.51-b03, mixed mode)

=== Xamarin Android Player ===

Version: Unknown version
Location: /Applications/Xamarin Android Player.app

=== Xamarin.Mac ===

Version: 2.0.1.64 (Enterprise Edition)

=== Build Information ===

Release ID: 509030001
Git revision: 5a524e1726ed103fdd4fe37e0356f2b35466ce9d
Build date: 2015-06-02 16:35:08-04
Xamarin addins: 51957cfbd06be911b212671ad05c2c6221ac90f9

=== Operating System ===

Mac OS X 10.10.3
Darwin lepton.local 14.3.0 Darwin Kernel Version 14.3.0
    Mon Mar 23 11:59:05 PDT 2015
    root:xnu-2782.20.48~5/RELEASE_X86_64 x86_64
Comment 1 Parmendra Kumar 2015-06-08 09:19:08 UTC
I have checked this issue with provided steps in bug description and getting same error:"Error FS0433: A function labeled with the 'EntryPointAttribute' attribute must be the last declaration in the last file in the compilation sequence, and can only be used when compiling to a .exe (FS0433) (Fsharpios)"

Screencast: http://www.screencast.com/t/GuEXlXnPUTO

IDE Log: https://gist.github.com/Parmendrak/676dce177bf23ccc3686

Environment info:

Xamarin Studio  5.9.4 (build 3)
Installation UUID: 1a096c6f-0678-402e-89b2-a2c10f7e80e4
Mono 4.0.2 ((detached/198235d)
Xcode 6.2 (6776)
Xamarin.Mac : 2.0.2.16 (Enterprise Edition)
Xamarin.iOS : 8.10.2.16 (Enterprise Edition)
Xamarin.Android : 5.1.4.8 (Enterprise Edition)
Mac OS X 10.9.4
Comment 2 Sebastien Pouliot 2015-06-08 09:30:11 UTC
@Vincent could you have a look at this ? thanks!
Comment 3 Vincent Dondain [MSFT] 2015-06-24 10:30:59 UTC
That is fixed in md-addins/templates-update-master (that will be merged soon) and roslyn.