views:

138

answers:

3

Can I use .resx files in F# 2.0 projects?

If so, how do I go about adding, and then using these resources.

Thanks in advance.

A: 

Could this be of interest?

http://stevehorsfield.wordpress.com/2009/08/15/wpf-resources-and-f/

or this

http://cs.hubfs.net/forums/permalink/9588/9579/ShowThread.aspx

leson
Almost, I'm not specifically using WPF, but it could work. Thanks.
Jim Burger
Thanks for the second link - I did see that, and was hoping things had progressed from using a C# project as a work around.
Jim Burger
+2  A: 

I'm using a .resx in an F# 2.0 project. Feel free to take a look at it and I hope it helps you. No great shakes but here it is for what it's worth.

http://github.com/OnorioCatenacci/ExtendedSearch

Onorio Catenacci
Thanks, I've gone down a similar path, hand coding a resource manager wrapper. I'm now wondering if it will localization will work...
Jim Burger
I'd be interested to hear if localization does work. I mainly used the .resx cause I wanted to refresh my memory--my .Net coding skills are a bit rusty.
Onorio Catenacci
+2  A: 

You can Add existing item a .resx file to an F# project, it should automatically get a BuildAction of EmbeddedResource and work. The VS tooling here isn't as good as the other languages yet, but MSBuild does all the heavy lifting, so it's just a matter of getting the right snippet of XML into the .fsproj file.

Brian