Now that we can write F# apps for iPhone and Android thanks to the folks at Xamarin, I'm really surprised that it's such a pain to get F# going with Windows Phone. I just tried to add an F# project to an WinPhone 8.1 (RT based) project and get a rather unhelpful "Unable to add a reference to project ..." from Visual Studio 2013. I've added a reference to FSharp.Core from the portable libs folder (Version 2.3.5.1). I believe it can still be done with 8.1 Silverlight apps, but that kind of hoops the whole universal app idea.
Does anyone know if it's possible with some csproj hacks or anything? I'm very naïve when it comes to portable libs and how they work.
The brand new Win 10 apps don't support F# seemingly because of the .NET Native initiative. You can vote for F# support here https://wpdev.uservoice.com/forums/110705-universal-windows-platform/suggestions/9110134-f-support-in-net-native-for-uwp
[Update]
I believe it may now be possible with the Centennial bridge https://developer.microsoft.com/en-us/windows/bridges/desktop
As of Python 3.6, f-strings are a great new way to format strings. Not only are they more readable, more concise, and less prone to error than other ways of formatting, but they are also faster!
The most common one is newline \n , but there are others. Many of them became less and less useful over time, such as \f . This is called form feed, is used to indicate to a printer that it should start a new page.
Use the Python backslash ( \ ) to escape other special characters in a string. F-strings cannot contains the backslash a part of expression inside the curly braces {} . Raw strings treat the backslash (\) as a literal character.
To define an f-string, you simply place an f before your string's first quotation mark, and insert variables wherever you want in the string using {} . Let's take a look at an example. Below, we define the same string as above, but this time using an f-string: >>> fruit = 'persimmon'
This seems to be classified as a bug at this moment: https://connect.microsoft.com/VisualStudio/feedback/details/845740/unable-to-add-reference-to-f-pcl-project-from-windows-phone-8-1-universal-project
The current workaround, as mentioned in the above link, is to add a reference to the resulting assembly/dll from your F# project directly (ie use "Browse" and point it to your "F#-based" dll), instead of adding a reference to your F# project. (At least this seems to work when using it in combination with FSharp.Core 3.3.1.0)
Does anyone know if it's possible with some csproj hacks or anything?
As far as I know, not possible. This has been a disaster for Microsoft, BTW. A major client of ours wanted tens of thousands of tablets and they took Microsoft tablets off the table because they don't support F#.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With