hubFS: THE place for F#

. . . are you on The Hub?
Welcome to hubFS: THE place for F# Sign in | Join | Help
in Search

Bug: FSI can't reference EXEs

Last post 12-18-2007, 16:18 by dsyme. 1 replies.
Sort Posts: Previous Next
  •  12-17-2007, 15:31 4335

    Bug: FSI can't reference EXEs

    Hey everyone,

    I just noticed that FSI (it seems) has a slight bug where it assume that a referenced assembly is a DLL (when, in fact, a .NET assembly could be either a DLL or an EXE).

    I realize it's not good programming practice to reference EXEs, and I'm refactoring my code into an EXE and a DLL, but I just thought I'd post this here for what it's worth.

    Here's my script:

    #I @"..\CSADesigner\bin\Debug" ;;
    #r
    @"CSADesigner.exe" ;;

    And here's my transcript from FSI (in VS 2008):

    >
    --> Added '{path-to-stuff}\..\CSADesigner\bin\Debug' to library include path

    >
    --> Referenced '{path-to-stuff}\..\CSADesigner\bin\Debug\CSADesigner.exe'

    > > let s = new SimulationOptions();;

      let s = new SimulationOptions();;
      ------------^^^^^^^^^^^^^^^^^^


    stdin(2,12): error: FS0039: The type constructor 'SimulationOptions' is not defined.
    stopped due to error

    > open CSADesigner.Configuration;;

    > let s = new SimulationOptions();;

    val s : SimulationOptions

     

    stdin(0,0): error: Unable to find the file CSADesigner.dll in any of
     C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\
     C:\WINDOWS\system32\..\assembly\GAC\Microsoft.Office.Interop.Owc11\11.0.0.0__71e9bce111e9429c
     C:\Program Files\Xceed Components\Bin\.NET\Signed DLLs
     {path-to-stuff}\..\CSADesigner\bin\Debug
     {path-to-stuff}
     C:\Program Files\FSharp-1.9.3.7\bin.


    Could not load file or assembly 'CSADesigner, Version=1.0.0.0, Culture=neutral' or one of its dependencies. The system cannot find the file specified.

    Hope that helps someone :)

    (offtopic: man, this HTML editor control has got to be the most frustrating thing to use.  It is completely unusable in Firefox, and only marginally works in IE.  What's up with the multiple newlines for everything that gets pasted?  And why doesn't the F# code formatting work all of the time?)


    http://thevalerios.net/matt/
  •  12-18-2007, 16:18 4347 in reply to 4335

    Re: Bug: FSI can't reference EXEs

    Yep, this is a known issue: F# 1.9.3 can't reference .EXE assemblies as if they were DLLs. Thanks for the report.

View as RSS news feed in XML
Powered by Community Server, by Telligent Systems