I created an application in c # very simple.
static void Main(string[] args)
{
Console.WriteLine("Cantidad de argumentos: {0}", args.Length);
foreach (string argumento in args)
{
Console.WriteLine("Argumentos: {0}", argumento);
}
Console.ReadKey();
}
Debugging works fine since I've set the parameters in the project properties.
But when you publish it generates a setup.exe and when you run it ( setup.exe arg1 arg2
) it gives me the following error!
Added!
This is a console type application, when publishing the following files are generated:
The versions are saved inside the folder
When running setup.exe the application is launched but it does not receive the arguments.
This application I need to run with arguento from the windows console to execute it with a .bat and this put it in a scheduled task.
I hope you can help me.
Greetings and thanks!