Domanda

I'm trying to use the Writeline activity to write to an output file. I've written the expression for the TextWriter as such:

new System.IO.StreamWriter(@"C:\Users\Owner\Documents\Visual Studio 2012\test.txt")

And the Text as such:

"Hello"

Now, the actual file is created when the activity is run, but there's not text in the file. It's just a 0 KB text file. Let me know if you need additional information.

È stato utile?

Soluzione

Your test is too simple, you are not closing the TextWriter so, the data in the buffers isn't flushed to disk. Try something like this (with the WriteLine TextWriter set to tw etc.):

enter image description here

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top