Never mind. I stepped through the code once. It didn't create a folder then, but it did the next time that function was called. The new folder had the name of the folder. Sorry.
StreamWriter.StreamWriter(string) creates folder instead of text file
Will Pittenger
281
Reputation points
I have an older project that was working. It has a line of code that attempts to create a text file. It looks like this:
new System.IO.StreamWriter(Program.LogXML_FullPath)
Program.LogXML_FullPath
returns a string and I've verified the value is as expected. The text file specified doesn't exist. So this constructor should create a text file as I've read the documentation. But it creates a folder with the expected name and appears to try to open that as a text file.
What's going on? As this project was considered stable, it hasn't changed much in ages and targets .NET Framework 4.