Question

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.

Was it helpful?

Solution

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top