Jump to content
Xtreme .Net Talk

How to write to a text file using Fable?


Recommended Posts

Guest cschristine
Posted

I'm trying to use Fable to convert some f# code I wrote into a web project, but I'm having some trouble with writing file output. Previously, when I just had a net core project, I could just do something like this:

 

[iCODE]File.WriteAllText("output.txt", "hello")[/iCODE]

 

But now if I try that, I get this error:

 

[iCODE]error FABLE: Cannot resolve System.IO.File.WriteAllText @ ./src/App.fsproj[/iCODE]

 

Is there something I need to import/add to make this work? Or is there a different way to write files in Fable? I would really appreciate any help or suggestions. Thank you in advance!

 

Continue reading...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...