VB.Net Why doesnt this code work from the command line
Posted on 2013-06-14
Hi Experts. I'm testing some code in both a forms application and console application. The code is this in the console or the same placed in the form load in the forms application.
My.Computer.FileSystem.WriteAllText("Test.txt", "Text,", True)
My.Computer.FileSystem.WriteAllText("Test2.txt", "Text,", True)
Catch ex As Exception
If I go to the Release folder and double click either program it works correctly and the files are created in the Release Folder.
If I run either program from the command line, the messagebox appears but the files are not created.
Please can someone explain why?
Thanks for the help.