Inside F#

Brian's thoughts on F# and .NET

Welcome to the F# CTP project system: project property pages

Posted by Brian on August 30, 2008

(Link reminders: download the new F# September 2008 CTP Release, and check out the new F# Developer Center.)

One of the goals of the F# CTP release is to make F# easier to approach for developers already familiar with Visual Studio.  If you have used prior releases of F#, while there were project "property pages", they were rather different from the property pages you’d encounter when using other Visual Studio languages, like C# or Visual Basic.  The new project property pages in the CTP release of F# enjoy the same look-and-feel as those from other Visual Studio languages.

The project property pages can be accessed by right-clicking on the project and choosing "Properties":

ProjectPropertyPage1

There are five tabs with various useful project-level settings.  For example, if I want to change the name of the assembly that gets built, I can do so on the "Application" tab:

ProjectPropertyPage2

And if I want to specify command-line arguments, I can do it via the "Debug" tab:

ProjectPropertyPage3

If I run the short program illustrated in the next screenshot, I can tell that these settings have taken effect; "Brian" was passed as a command-line argument, and the active window title shows that the application is named "Hello.exe":

ProjectPropertyPageRunning

Incidentally, this tiny example demonstrates how you can use the F# EntryPointAttribute to mark a function as the "main" of the application, which receives the command line arguments as an array of strings and returns an integer return code.  (Those who are curious can read more about EntryPoint in the F# manual.)

More on other new features of the CTP coming soon!

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: