Hi f,

I can't repro this error. this script works fine for me:

1
2
3
4
5
#r "FSharp.PowerPack.dll"

open Microsoft.FSharp.Math

let z = Complex.Create(2.0,2.0)

and referencing FSharp.PowerPack.dll in the project setting also works.

best of luck,

Danny

By on 1/8/2009 4:00 AM ()

Thanks for the update Danny.

If I run your script from F# interactive in VS it works.

And then subsequently since we have explicitly loaded the dll with

>#r "FSharp.PowerPack.dll"

everything seems fine. when I continue working with code. in that session.

So thanks I can use this for now as a work around.

Are you able to get the project setting to work with a fresh/reset session?

It is also interesting that intellisense is working so the project reference seems fine to VS.

It is when I send the code to the interactive session in VS that I get the problem.

Could it just be that the interactive session needs the explicit

>#r "FSharp.PowerPack.dll"

instruction.

Can you tell me at what point are the dlls loaded into the interactive session. Is it when the open command is executed or when the code referencing the module is executed?

Thanks.

By on 1/9/2009 2:48 AM ()

It's not a work around it's expected behaviour, at least for the moment, the console doesn't see you're project references, you have to explicitly add them using the #r command.

I can see how this could be confusing, but I'm not sure if there's plans to change the behaviour.

Robert

By on 1/9/2009 2:59 AM ()

Thanks Rob. Your comments clears up my puzzle.

It is confusing as the project refs in VS are not being used in the interactive session. So everything in VS leads you believe you are all set until you run something in the interactive session.

By on 1/9/2009 3:04 AM ()

While I think of it, another tip that might help: if you keep all your scripts in .fsx then these don't behave as if the project's dlls are referenced. l believe the idea is you create your library code in a compiled dll and then use an .fsx script to test it. However, the temptation is to test all your code in the top level and this flexibly allows you to rebuild small portions of your code.

By on 1/9/2009 3:15 AM ()
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