Did you remember

#r "FSharp.PowerPack.dll"

?

By on 9/2/2008 7:03 PM ()

of course ! :-)

I basically started a new F# project, used the default .fs file, use the VS Project "Add Reference.." to get the powerpack dll in, and then typed up the code in the previous post

All the code is in the .fs file, and I select all, do Alt+Enter to pipe it to the fsi and then -> error on accessing at least the SI and PhysicalConstants modules

So I have no idea where the problem is, whether it's the FSI having a problem understanding the module reference

OK here is something interesting, as I was typing up this post, it worked ONCE, so to verify, I shut down VS and ran the program again and it FAILED and hasn't worked since.

Here is a screenshot of VS


[[link:www.flickr.com]

also, another note, in Object Browser, I can see all the constants listed in the PhysicalConstants module, but when I expand the SIModule, all I get are the basic methods like ToString and GetType -> is there some way for it to show all the members such as m, s, kg etc?

Thanks, how the pic gives a clue

By on 9/3/2008 11:35 AM ()

You need the "#r" version for VFSI. The 'add reference' works with compiled code in the project, but VFSI is not aware of all of this extra 'project context' stuff. (You may prefer to use a .fsx (F# script) file for an editing buffer if you intend to send everything to FSI while trying things out.)

By on 9/3/2008 11:46 AM ()

Thanks, that works! One less headache to worry about, tons more on the way [:)]

Well for anyone else who may potentially have this problem, as both prior responders stated, if you go the Add Reference route, the FSI will yell at you

So you can still work with the .fs file if you want, but first, if do the #r "FSharp.PowerPack.dll";; or whatever assembly you need to reference in the FSI window. Then you can select all your code from the .fs file and Alt+Enter it to FSI and it should work just fine now.

Thanks for the help out.
~sparky

By on 9/3/2008 12:13 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