It depends -- if you just want to see if the F# library loads, then I guess looking in the GAC for it is probably the most straightforward.

I would guess that the more proper way would be to find the MSI code for that redist, and require check/depend on that.

In VS2010, the built-in setup project system allows you to specify the F# redist as a prerequisite and download as needed.

By on 6/24/2009 10:52 PM ()

For Windows you can also look in the registry. This may change in Beta2 and/or VS2010 RTM, but for 1.9.6.16 here's the registry key the F# Language Service uses to find the installation directory.

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\AssemblyFolders\Microsoft.FSharp-1.9.6.16

By on 6/25/2009 2:18 PM ()

I would like to thank everyone for thier feedback, it was most helpful.

Thank You!!!!

By on 6/29/2009 11:00 AM ()

Assemblies are loaded by CLR on demand so referencing F# Core dll in your project and writting something like this:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
public static bool IsFSharpInstalled()

{

  try

  {

    object arr = Microsoft.FSharp.Collections.FSharpList<int>.Empty;

    return true;

  }catch(TypeLoadException)

  {

    return false;

  }

}

might work.

By on 6/23/2009 2:01 PM ()
IntelliFactory Offices Copyright (c) 2011-2012 IntelliFactory. All rights reserved.
Home | Products | Consulting | Trainings | Blogs | Jobs | Contact Us | Terms of Use | Privacy Policy | Cookie Policy
Built with WebSharper