I know this is really old, but I am writing because I could not find answers.
(Environment: VS2010, C# console app with updates targeting .net 3.5 on Win 7 64)
I could not get a console app to run in task scheduler. My app is published to the network file share. Task Scheduler failed to run \AutoSync.application with a "%1 is not a valid win32 application" error. Task Scheduler would say that \setup.exe ran successfully, but none of the procedures that the app did appeared to be done, including the status email it sent before closing. It did not matter if I used the UNC path or a lettered mapped drive, nothing would work. I did not try publishing to the local machine, it was out of the question for me.
The app would run perfectly when ran manually. Then I followed the path that my start menu shortcut used - "C:\Users\foo\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\AutoSync\" and selected the shortcut found there. It filled the actual exe path
"C:\Users\foo\AppData\Local\Apps\2.0\W9BDW4LH.KM0\J6DPJEM9.LT0\auto..tion_a217eb88f33937fd_\AutoSync.exe". This was all that I needed.
My program now runs on a daily schedule and emails me upon completion. However, I am prepared to redo my task's action after the next update.