F#3.0 language binding MonoDevelop3

198 views
Skip to first unread message

7sharp9

unread,
Oct 29, 2012, 5:17:42 PM10/29/12
to fsharp-o...@googlegroups.com
Hi, Im trying to build The F# language binding for MonoDevelop 3.0.4.7

I already have the F#3.0 compiler built and installed so thats all fine.

I also currently have the F# language binding installed and working

When I come to compile the latest F# language binding Im getting the following error:

Users/dave/code/fsharpbinding/MonoDevelop.FSharpBinding/MonoDevelop.FSharp.fsproj (default targets) ->
/Library/Frameworks/Mono.framework/Versions/2.10.9/lib/mono/Microsoft F#/v4.0/Microsoft.FSharp.Targets (CreateManifestResourceNames target) ->

: error : Error initializing task ItemGroup: Not registered task ItemGroup.

Anyone have any ideas?  Im probably doing something dumb, you can see that the 2.10.9 version of the mono framework is being used, have I just not configured something?

Cheers
Dave

Ben Winkel

unread,
Oct 29, 2012, 5:54:38 PM10/29/12
to fsharp-o...@googlegroups.com

Use the Mono 3.0 tools - it looks like you are using Mono 2.10.9. xbuild only works with Mono 3.0 + F# 3.0, and the binding is now built with xbuild.

A pre-release of Mono 3.0 is here: http://download.mono-project.com/archive/3.0.0/. However there are still a few prolems with this release, in particular MonoDevelop keeps asking to "update" to 2.10.9 after it is installed. Don't know why.

You might still be able to compile with MonoDevelop itself if you turn off xbuild using "Build" on MonoDevelop.FSharp.fsproj but it would be better to move to Mono 3.0



--
--
You received this message because you are subscribed to the Google
Groups "FSharp Open Source Community" group.
To post to this group, send email to fsharp-o...@googlegroups.com
To unsubscribe from this group, send email to
fsharp-opensou...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/fsharp-opensource?hl=en
 
 
 

Tomas Petricek

unread,
Oct 29, 2012, 8:36:57 PM10/29/12
to fsharp-o...@googlegroups.com

I was just trying to install F# + MonoDevelop on Ubuntu and I have the same issue as Dave. I see this is fixed in Mono 3.0, but that does not really help, because the pre-release is only available for Mac (as far as I can tell from the link below – and moreover, not everyone will be able to update to Mono 3.0 immediately).

 

Do you think it would make sense to keep the old Makefile (perhaps as an alternative) around for a while?

 

T.

7sharp9

unread,
Oct 29, 2012, 8:39:51 PM10/29/12
to fsharp-o...@googlegroups.com
I reinstalled mono3 followed by reinstalling fsharp3, so my fsharpc now reads v3.

I try to do a make and all goes well apart from: /bin/sh: line 0: cd: addins/MonoDevelop.FSharp.AspNet.Mvc: No such file or directory
which I ignore as its not an error.

now a make install get this error:  

Creating package MonoDevelop.FSharpBinding_3.2.1.mpack
System.IO.FileNotFoundException: Could not find file "/Users/dave/code/fsharpbinding/bin/FSharp.Core.dll".
File name: '/Users/dave/code/fsharpbinding/bin/FSharp.Core.dll'
  at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean anonymous, FileOptions options) [0x00000] in <filename unknown>:0 
  at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share) [0x00000] in <filename unknown>:0 
  at (wrapper remoting-invoke-with-check) System.IO.FileStream:.ctor (string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare)
  at System.IO.File.OpenRead (System.String path) [0x00000] in <filename unknown>:0 
  at Mono.Addins.Setup.SetupService.BuildPackageInternal (IProgressStatus monitor, System.String targetDirectory, System.String filePath) [0x00000] in <filename unknown>:0 
  at Mono.Addins.Setup.SetupService.BuildPackage (IProgressStatus statusMonitor, System.String targetDirectory, System.String[] filePaths) [0x00000] in <filename unknown>:0 
  at Mono.Addins.Setup.SetupTool.BuildPackage (System.String[] args) [0x00000] in <filename unknown>:0 
  at Mono.Addins.Setup.SetupTool.RunCommand (System.String cmd, System.String[] parms) [0x00000] in <filename unknown>:0 
  at Mono.Addins.Setup.SetupTool.Run (System.String[] args) [0x00000] in <filename unknown>:0 
  at MonoDevelopProcessHost.RunSetup (System.String[] args) [0x00000] in <filename unknown>:0 
  at MonoDevelopProcessHost.Main (System.String[] args) [0x00000] in <filename unknown>:0 
make: *** [install] Error 255

If I manually copy in the Fsharp.Core.dll into the bin folder it appears to work...  

How can i verify that everything is ok?  The build output for my sample doesn't have the fsc output like VS so Im unsure if things are working...

Cheers
Dave 

Ben Winkel

unread,
Oct 29, 2012, 9:17:07 PM10/29/12
to fsharp-o...@googlegroups.com
If just using the binding, you don't need to compile it, you just install it from the gallery on all systems. It has no dependencies on any particular version of Mono (though is tightly bound to the version of MonoDevelop, and the somewhat crucial xbuild support only works properly with Mono 3.0)

For developing the binding, I'd say we should just require Mono 3.0, as long as the actual use of the binding doesn't depend on any particular version. You could resurrect the old makefile support in your repo, but the configure script was particularly painful. 

The Mono team don't make binary installs for Linux (the distributions do it), so you would have to compile Mono 3.0, at least until Ubuntu or someone makes a package available.

Tomas Petricek

unread,
Oct 29, 2012, 9:24:56 PM10/29/12
to fsharp-o...@googlegroups.com

Thanks, yes I got that to work using just the addin repository (after I installed MD 3.0.4+). I’m happy with that, but it is always nice to have a version compiled from source in case I found any bugs.

 

I recovered the old Makefile as you say – it seems to be working okay for now, but I agree moving to xbuild is a good thing for future development.

 

Anyway, I got far enough to do some updates to the IntelliSense tool!

 

T.

 

PS: Every time I try to install Mono from source, I break something (because my *nix skills are very poor!) so I think I’ll wait until someone makes a binary package.

Ben Winkel

unread,
Oct 29, 2012, 9:32:23 PM10/29/12
to fsharp-o...@googlegroups.com

Both the warning and the manual copy of FSharp.Core are fixed now, see last two commits on https://github.com/fsharp/fsharpbinding/commits/master

To check things are working try a few different things somewhat at random
  - Check the F# templates are appearing
  - Create a console project (NOTE: retarget it to .NET 4.0 using right-click->options->General)
  - Check there are completion lists in the console project
  - Check you can build the console project
  - Check you can run the console project
  - Check you can "debug-step-into" the console project
  - Check you can set a break point in the console project
  - Check there are type tips showing when you move the mouse over code identifiers
  - Load an existing .fsproj (e.g. see MonoDevelop.FSharpBinding/tests/projects/...) and check if completion works etc.
  - Run xbuild on a few .fsproj (this is nothing to do with the binding, it is just fsharp/fsharp)

There are a couple of known issues, see https://github.com/fsharp/fsharpbinding/issues. The issue where new projects target .NET 3.5 by default is really annoying.

If you make changes to the binding, then loss of completion lists etc. can be disturbing and hard to debug. There are some debugging techniques. To launch MD you can use
   /Applications/MonoDevelop.app/Contents/MacOS/MonoDevelop --new-window --no-redirect

To enable some logging you can use
  export FSHARPBINDING_LOGGING=*

I've added these notes to the README

-- ben

--

Ben Winkel

unread,
Oct 29, 2012, 9:38:06 PM10/29/12
to fsharp-o...@googlegroups.com
If you want to send a pull request for the makefile additions that's fine - put them at the end of the Makefile.orig under a target like "no-xbuild" or something

One reason I removed them was experimenting with ASP.NET support in MD, and the number of resource files etc. got too big.  That experiment went OK until the CodeDom generated code which was not so good.... Would like to improve that, surely we can get that better in the common cases.



--

7sharp9

unread,
Oct 29, 2012, 10:02:45 PM10/29/12
to fsharp-o...@googlegroups.com
Thanks Ben, You never know I might get MonoGame working yet!

D.

Ben Winkel

unread,
Oct 29, 2012, 10:17:33 PM10/29/12
to fsharp-o...@googlegroups.com

I hadn't taken a look at MonoGame until you mentioned it jut now - what an amazing framework.

7sharp9

unread,
Oct 29, 2012, 10:49:27 PM10/29/12
to fsharp-o...@googlegroups.com
The next thing I think is needed in F# language binding is Mac packaging.  As shown in the attached file.  

Im not entirely sure where or how this is plugged in I don't suppose anyone knows?

D.
pic.jpg

Ben Winkel

unread,
Oct 29, 2012, 10:56:05 PM10/29/12
to fsharp-o...@googlegroups.com
is that a C# MonoGame template?

Dave Thomas

unread,
Oct 29, 2012, 11:11:18 PM10/29/12
to fsharp-o...@googlegroups.com
Yes it is, the options shown are also in the C# MonoMac project templates too, there is no UI defined in the MonoGame template.  

Half the battle is finding where the various pieces are defined and how they are tied together, so any advice is appreciated :)

Getting MonoGame running with F# in VS was a breeze :)

D.

Dave Thomas

unread,
Oct 29, 2012, 11:14:56 PM10/29/12
to fsharp-o...@googlegroups.com
<Import Project="$(MSBuildExtensionsPath)\Mono\MonoMac\v0.0\Mono.MonoMac.targets" />

I get this bad boy in the project file is the key, Ill have a play around tomorrow.

D.

On 30 October 2012 02:56, Ben Winkel <funnel...@gmail.com> wrote:

Dave Thomas

unread,
Oct 29, 2012, 11:16:55 PM10/29/12
to fsharp-o...@googlegroups.com
Excuse all the typos its very late!

<Import Project="$(MSBuildExtensionsPath)\Mono\MonoMac\v0.0\Mono.MonoMac.targets" />

I get this bad boy in the project file, so I guess that must be the key, Ill have a play around tomorrow.

D.

Ben Winkel

unread,
Oct 29, 2012, 11:20:12 PM10/29/12
to fsharp-o...@googlegroups.com
bingo.  also watch out for extra ProjectTypeGuid things in the .csproj/.fsproj that light up extra project flavors
Reply all
Reply to author
Forward
0 new messages