What's New for Visual F# in Visual Studio 2012
Visual F# in Visual Studio 2012 features F# 3.0, which extends the succinct and expressive F# language to support F# information-rich programming. This technology lets you program directly against rich spaces of data and services that often dominate enterprise and web programming today, such as databases, web services, web data feeds and data brokers.
F# information-rich programming is code-focused and can be used in both scripts and projects. It also allows you to specify OData and SQL Server database connections directly in your code, while giving strong types with IntelliSense assistance. The mechanism is extensible, allowing you to write or reference new providers for data, code and service technologies such as SharePoint, web ontologies, Windows Management Instrumentation (WMI), XML and other information sources. F# information-rich programming includes the F# Type Providers mechanism, F# LINQ Queries, and a set of built-in type providers for database, OData, and web service programming.
Visual F# in Visual Studio 2012 also includes many enhancements to the code editor designed to improve productivity when writing F# code.
What's New in the F# Language and Compiler
The following new features are available in F# 3.0:
Type Providers. Type Providers generate types based on structured data. They make it easier to access diverse sources of data. Type providers for several commonly used data sources are included in the F# library. For general information on type providers, see Type Providers. These include:
OData services. OData or Open Data, which is a network service protocol that allows data to be transmitted over a network or the Internet. For more information, see Walkthrough: Accessing an OData Service by Using Type Providers (F#).
Database Connections such as SQL. For more information, see Walkthrough: Accessing a SQL Database by Using Type Providers (F#).
Database Schema, such as that represented in a .dbml file, which is the database schema file format used by LINQ to SQL. For more information, see Walkthrough: Generating F# Types from a DBML File (F#).
Data specified by the Entity Data Model format. For more information, see Walkthrough: Accessing a SQL Database by Using Type Providers and Entities (F#) and Walkthrough: Generating F# Types from an EDMX Schema File (F#).
Web services in the WSDL format. For more information, see Walkthrough: Accessing a Web Service by Using Type Providers (F#).
Additionally, you can author your own type providers. For more information see, Tutorial: Creating a Type Provider (F#).
Query Expressions. This feature implements LINQ for F#. You can now write queries in a SQL-like syntax in the F# language. For more information, see Query Expressions (F#).
Auto-implemented properties. You can now declare properties without also declaring a backing store for the property. For more information, see Properties (F#).
What's New in the Development Environment
This version of Visual F# contains the following enhancements in the editor and integrated development environment (IDE):
Parameter Help. When typing a function or method call, information on each parameter now appears as you type.
Enhanced IntelliSense. These features provide helpful information in tooltips as you write code in F#.
What's New in the F# Library
The following new features are included in this version of the F# Core Library:
Library features to support query expressions. For more information, see Query Expressions (F#). The QueryBuilder type defines the query computation expression.
Support for nullable types (Nullable<T>), including conversion operators and arithmetic operators. For more information, see Linq.Nullable Module (F#) and Linq.NullableOperators Module (F#).
Units of measure types for the International System of Units (SI). This was formerly in the F# PowerPack but has been promoted to the F# Core Library. For more information, see Microsoft.FSharp.Data.UnitSystems.SI Namespace (F#).
Targeted Frameworks and Platforms
By using this version of Visual F#, you can create applications that run against the following versions of the .NET Framework: 2.0, 3.0, 3.5, 4, and 4.5. You can also target an app for Silverlight 5, and you can create libraries and components that work with Windows Store apps by using the F# Portable Library project template.
Warning
You can upgrade most F# projects to Visual Studio 2012 when you first open them in that version. However, you can't upgrade a Silverlight project from an older version of Visual Studio to Visual Studio 2012. Instead, you create a Silverlight project in Visual Studio 2012 and then copy your code into the new project. Silverlight projects that you create by using Visual Studio 2012 target Silverlight 5.
Minor Changes
In addition, you might want to be aware of the following minor changes:
- Triple-quoted strings. These strings can contain single-quote characters. For more information, see Strings (F#).
See Also
Concepts
What's New in Visual Studio 2012