Home

LinqPad F# Program : Unable to find the file 'mscorlib.dll' in any...

Experiencing following problem when executing F# program/express in LinqPad:
Unable to find the file 'mscorlib.dll' in any of C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5 C:\Program Files (x86)\LINQPad4 C:\Program Files (x86)\Microsoft SDKs\F#\3.0\Framework\v4.0

Any help esp how LinqPad determines above directories to search libraries in?

Regards,
IP

Comments

  • Can you successfully invoke the fsc compiler from the command line?
  • Running C:\Program Files (x86)\Microsoft SDKs\F#\3.0\Framework\v4.0\fsc produces:
    "
    error FS0082: Could not resolve this reference. Could not locate the assembly "mscorlib.dll". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. (Code=MSB3245)

    Same error is repeated for other dlls: e.g."System.dll", "System.Xml.dll"....till ""System.Numerics.dll".

    Error reporting ends with similar error we experience in LinqPad:
    unknown(1,1): error FS0078: Unable to find the file 'mscorlib.dll' in any of
    C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5
    C:\Users\ip\Documents\LinqPadFSTests


    But interestingly, running C:\Program Files (x86)\Microsoft SDKs\F#\3.0\Framework\v4.0\fsi is working without any problem.

    So fsi runs while fsc is not. Searching for the issue at fsc level.

    Thanks Joe, appreciate your help.
Sign In or Register to comment.