4

I have a solution for VS2010 that includes some F# projects that work against the F# 2.0 compiler/SDK, leveraging fparsec and fsharp powerpack.

I then upgraded my main development machine to VS2012, loaded the solution and was able to compile just fine.

However I just repaved a seperate machine with windows 8 and VS2012, and loading the solution on that machine causes compilation failure, as the project is targeting F# 3.0, and fparsec/fsharp powerpack don't appear to compile any more.

Is it possible to install the FSharp 2.0 SDK (and if so, where do I get it from?) on this new windows 8 machine and get the solution to compile again, or would I need to do something else to get this working on both the old and new machine?

Updated 2012-10-25

Compilation is now working after restarting VS2012, but when executing code I'm getting an unexpected error related to my F# code:

Method not found: 'ParserResult`2<!!0,Microsoft.FSharp.Core.Unit> FParsec.CharParsers.run(
Microsoft.FSharp.Core.FSharpFunc`2<FParsec.CharStream`1<Microsoft.FSharp.Core.Unit>,
FParsec.Reply`1<!!0>>, System.String)'.

This does not happen when compiling/executing the same code on a machine that had first VS2010 installed with F# and then was upgraded to vs2012 - only happening on the machine which has just vs2012 installed.

Any ideas?

Bittercoder
  • 11,753
  • 10
  • 58
  • 76
  • Looks like my new issue as the same as the one documented here: https://bitbucket.org/riles01/fparsec/issue/1/nuget-package-not-working-with-vs2012 going to try the binding redirects and will confirm if that resolves the issue. Guess environment upgraded from VS2010 already has the F# 2.0 core library installed in the GAC? – Bittercoder Oct 25 '12 at 04:29
  • Note that the NuGet package currently doesn't contain the latest version of FParsec. If you have issues with the NuGet package, please try the latest version of FParsec from https://bitbucket.org/fparsec/main/overview, and if you then still have problems, please file a ticket. – Stephan Tolksdorf Oct 25 '12 at 22:36

1 Answers1

2

If you set the target framework to "4.0" (or lesser), it should compile the same as F# 2.0 (with a few new nice features, such as auto properties). I see no reason to insist on leaving out the new features, and definitely no reason to leave out all the bug fixes that came with F# 3.0 .

Ramon Snir
  • 7,520
  • 3
  • 43
  • 61
  • I found the initial compilation error went away after restarting the machine, it was already target .Net Framework 4.0. However I now have a new problem - will update the question. – Bittercoder Oct 25 '12 at 03:40
  • @Bittercoder It seems that Ryan Riley has solved your new issue. – Ramon Snir Oct 25 '12 at 06:16