Home
Options

Execution of F# code fails if only VS 2012 RC is installed

edited September 2012
I have only VS 2012 RC installed on my PC. When I try to run any F# code LINQPad fails with the error "Cannot locate C:\Program Files (x86)\Microsoft F#\v4.0\fsc.exe - is F# installed?".

Windows 7 x64, Visual Studio 2012 RC (there have not been any versions of VS previously installed except 2012 RC).

Comments

  • Options
    Where is fsc.exe located on your machine?
  • Options
    It's in C:\Program Files (x86)\Microsoft SDKs\F#\3.0\Framework\v4.0.
  • Options
    Are you running the latest beta? LINQPad searches the folder you mention for fsc.exe. It will also recognize fsc.exe if it's in the same folder as LINQPad.exe:
    static string GetFscPath ()
    {
    	string stem, path;
    
    	path = Path.Combine (AppDomain.CurrentDomain.BaseDirectory, "fsc.exe");
    	if (File.Exists (path)) return path;
    
    #if V4
    	// Look for F# 3.0 compiler:
    	stem = @"Microsoft SDKs\F#\3.0\Framework\v4.0\fsc.exe";
    
    	path = Path.Combine (PathHelper.ProgramFilesX86, stem);
    	if (File.Exists (path)) return path;
    
    	path = Path.Combine (PathHelper.ProgramFiles, stem);
    	if (File.Exists (path)) return path;
    #endif
    	// Look for F# 2.0 compiler:
    #if V4
    	stem = @"Microsoft F#\v4.0\fsc.exe";
    #else
    	stem = @"FSharp-2.0.0.0\bin\fsc.exe";
    #endif
    	path = Path.Combine (PathHelper.ProgramFilesX86, stem);
    	if (File.Exists (path)) return path;
    
    	path = Path.Combine (PathHelper.ProgramFiles, stem);
    	if (File.Exists (path)) return path;
    
    	return null;			
    }
  • Options
    Oh, I've tried it on stable build, 4.42.1. Now I've downloaded beta (4.42.12) and it works well!

    BTW the awkward error message when compiling F# script with errors has gone away too!

    Thanks!
Sign In or Register to comment.