I have a .net console application that runs excel. I have work on my development, but I cannot get it to work in my production environment. When I try to start it, I get the following error: "The system cannot execute the specified program." I installed .net 2.0 sp2 on my production server. Any ideas?
Thanks,
Code
static void Main(string[] args)
{
DateTime priceDate;
bool runningForMidDay;
if (args.Length == 0)
{
priceDate = DateTime.Now;
runningForMidDay = false;
}
else
{
if (args[0].ToString() == "-?")
{
Console.WriteLine("This application...");
Console.ReadLine();
return;
}
if (!DateTime.TryParse(args[0].ToString(), out priceDate))
priceDate = DateTime.Now;
if (!bool.TryParse(args[1].ToString(), out runningForMidDay))
runningForMidDay = false;
}
if (runningForMidDay)
{ ... }
else
{ ... }
}
source
share