I haven't built many console apps, but I noticed that command-line args are ignored when the .exe was created with Visual Studio 2013's publish feature. The .exe in the project /bin/debug folder acknowledges command-line args.
I created this test console app because I couldn't get command-line args with a few example(s) of a self-installing windows service.
What am I missing?
Here is my simple console app:
class Program
{
static void Main(string[] args)
{
if (args.Length == 0)
{
Console.WriteLine("arrrrrrrrrrrgggggggg!");
}
else
{
for (int i = 0; i < args.Length; i++)
Console.WriteLine("Arg: {0}", args[i]);
}
Console.ReadLine();
}
}