2008-03-12
| Table of Contents: |
| Rate This Article: | Add This Article To: |
( Page 3 of 4 )
Creating an F# Application in Visual Studio
When you install F# using the MSI file, you also get a new template for Visual Studio. In Visual Studio, click File &arr; New &arr; Project and you値l see the New Project dialog box shown in Figure 3. You値l find the F# project template in the Other Project Types\F# Projects folder. Type a name for your new project and click OK to create it.
Figure 3: Visual Studio provides a new project template you can use to create F# applications.
What you値l see in Solution Explorer might be a little disappointing, but it痴 really quite flexible. Right click the project entry and choose Add → New Item. You値l see the list of F# items shown in Figure 4. I知 not going to discuss all of these items in this article, but as you can see, F# has a lot to offer. For now, highlight the F# Source File entry, type a name for the new file, and click Add.
Figure 4: Use the F# item templates to create the kind of application you want.
Visual Studio automatically opens the file and you値l find a wealth of sample code inside, as shown in Figure 5. Working with this example can help you understand how F# works. More importantly, you can set break points, check the value of variables, and perform other debugging tasks just as you would with any other .NET programming language.
Figure 5: Try all of the standard debugging features with the default F# example.
![]() |
|


