Compilation of the F # 2.0 project in VS2012

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

Then I upgraded my main development machine to version VS2012, downloaded the solution and was able to compile just fine.

However, I just placed a separate machine with windows 8 and VS2012, and loading the solution on this computer causes compilation to fail, as the project targets F # 3.0 and fparsec / fsharp powerpack no longer compiles.

Is it possible to install the FSharp 2.0 SDK (and if so, where will I get it from?) On this new Windows 8 computer and get the compilation solution again, or will I need to do something else to get it working both on the old one and on a new car?

Updated 2012-10-25

Compilation now works after restarting VS2012, but when I execute the code, I get an unexpected error related to the 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 the first VS2010 installed with F # and then was upgraded to vs2012 - only on a computer on which only vs2012 is installed.

Any ideas?

+4
source share
1 answer

If you set the target infrastructure to "4.0" (or less), it should compile the same as F # 2.0 (with a few new good features, such as automatic properties). I see no reason to insist on ignoring the new features, and, of course, there is no reason to leave all the bug fixes that were associated with F # 3.0.

+2
source

Source: https://habr.com/ru/post/1441889/


All Articles