Bug 54463 - Unable to build fsharp project using EntryPointAttribute with either xbuild or msbuild using mono 5.0
Summary: Unable to build fsharp project using EntryPointAttribute with either xbuild o...
Status: VERIFIED FIXED
Alias: None
Product: Tools
Classification: Mono
Component: msbuild ()
Version: 4.8.0 (C9)
Hardware: Macintosh Mac OS
: Normal normal
Target Milestone: 15.2
Assignee: Ankit Jain
URL:
Depends on:
Blocks:
 
Reported: 2017-04-04 17:47 UTC by Peter Collins
Modified: 2017-04-07 19:10 UTC (History)
1 user (show)

Tags:
Is this bug a regression?: Yes
Last known good build: mono-4.8.0-branch


Attachments
Template which reproduces the error (5.90 KB, application/zip)
2017-04-04 17:47 UTC, Peter Collins
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 GitHub or Developer Community 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:
VERIFIED FIXED

Description Peter Collins 2017-04-04 17:47:47 UTC
Created attachment 21189 [details]
Template which reproduces the error

## Steps to reproduce ##
1. Download the attachment, or create a new F# GTK# template in XS/VSfM: New Solution -> Other -> .NET -> Gtk# 2.0 Project -> F#.
2. Attempt to build, the following error should manifest:

> error FS0433: A function labeled with the 'EntryPointAttribute' attribute must be the last declaration in the last file in the compilation sequence.
This template (and previously existing projects created from this template) are building successfully against the command line xbuild and msbuild tools which ship with mono 4.8.0. This error is new in mono 2017-02.

## Supplemental Info ##
Log File #1:	http://xqa.blob.core.windows.net/gist/log-8bef4958892f449db1e7871206cee65c.txt

## Environment ##
Operating System: Mac OS X 10.11.5
Mono JIT compiler version 5.0.0.41 (2017-02/55a698e Tue Apr  4 06:51:03 EDT 2017)
Comment 1 Ankit Jain 2017-04-04 18:27:22 UTC
This should fix it for mono:
https://github.com/xamarin/bockbuild/pull/72

Upstream: https://github.com/fsharp/fsharp/pull/707
Comment 2 Ankit Jain 2017-04-06 22:17:16 UTC
Merged.
Comment 3 Peter Collins 2017-04-07 19:10:14 UTC
Verified fixed in 2017-02/851b6c76