문제

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.

도움이 되었습니까?

해결책

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top