The ResX type provider

The ResX type provider

This tutorial shows the use of the ResX type provider. It allows typed access to .resx files.

Create a resource file in Visual Studio like:

alt text

Reference the type provider assembly and configure it to use your Resource1.resx file:

Now you have typed access to .resx files:

alt text

Reading from the resx file

Multiple items
namespace FSharp

--------------------
namespace Microsoft.FSharp
namespace FSharp.Configuration
type Resource1 = ResXProvider<...>

Full name: ResXProvider.Resource1
Multiple items
module ResXProvider

from FSharp.Configuration

--------------------
type ResXProvider

Full name: FSharp.Configuration.ResXProvider
property ResXProvider<...>.Greetings: string


Greetings
Fork me on GitHub