F# interactive: Reference a project in currently open solution

前端 未结 6 909
忘掉有多难
忘掉有多难 2021-01-01 10:22

I would like to use the F# interactive console with the projects in the currently open solution in Visual Studio 2010. Is there a quick and easy way to add a reference in t

6条回答
  •  情书的邮戳
    2021-01-01 11:10

    I don't think there is any direct way to reference a project in the solution. The best way I can think of is to add a FSX file somewhere to your project with the #r directive:

    #r @"bin\Debug\YourProject.dll"
    

    Then you can at least reference the compiled DLL file simply by hitting Alt+Enter in Visual Studio. As far as I know, you cannot reference the project - you can only reference an assembly.

    Currently, F# Interactive is really disconnected from the project system in Visual Studio. I suppose that closer integration would be quite useful (but probably difficult to provide).

提交回复
热议问题