-
F# Projects - Order Does Matter
-
It's common to run into a few simple problems when learning a new programming language. One such problem that I ran into with F# was resolving dependencies within projects.
With the September F# CTP (version 1.9.6.2), it's pretty easy to handle dependencies on external projects since it is done as it is in C# with the "Add Reference..." context menu item. Dependencies between .fs files within a project behave a bit differently, though. As it turns out, the order that the files appear in the project determines the order that they are compiled in.
For example, lets say that I have the following two files:
SomeLibrary.fs
#light
namespace SomeLibrary
type SomeType = { foo : int }
Dependent.fs
#light
open SomeLibrary
let deFoo (x:SomeType) =
x.foo
If I place Dependent.fs above SomeLibrary.fs in the project as shown below, I get a lovely compile error telling me that "The namespace or module 'SomeLibrary' is not defined".
However, once you switch the order using the "Move Up" or "Move Down" context menu actions, everything works as expected.

-
Odd Vista Installation Error
-
Today I was trying to install Vista on my home machine (to play around with a dual boot/vmware hybrid setup) when I ran into the following error:
"Windows is unable to find a system volume that meets its criteria for installation"
It turns out that I just needed to set the partition that I was installing to as active. Since you're already working with the Vista installer, the easiest way to do this is to first press F8 as the installer starts running. This should bring up a DOS prompt where you can use the diskpart program to set the partition to active. To accomplish this, run diskpart in the DOS prompt. Then use the "List Disk" command to figure out which disk you want, followed by the "Select <DISK NAME>" command to select that disk. Next repeat the previous step with "List Partition" and "Select <PARTITION NAME>" to select the partition you want to make active. Finally, just use the "Active" command, and like magic the Vista installer should stop with its complaining.
Now you just need to hope that the disk you're installing from doesn't have any errors; as you may know, the Vista .iso is notoriously difficult to burn.
The following thread has more information:
http://help.lockergnome.com/vista/Windows-unable-find-system-volume-ftopict7572.html