DevDevDev DevDevDev - 2 years ago 170
C# Question

How to run a c# console application from windows task scheduler on server

When publishing my console app from VS2017, it creates a .application file that must be run to launch the program. Once I've placed it on the server, I can start it by CMD command, but the program often asks to be installed whenever I start it and if it does this then the task scheduler won't run it.

I just want to be able to run this project daily from the server without having to mess with it. Thanks.

Tom Tom
Answer Source

You can do this by taking all the dependent dll's and the following files:

  • exe
  • exe.config
  • application
  • exe.manifest

These are located in the project folder normally bin\debug. if you add all these in a folder and drop this on the server you should be able to run the exe without having to install.

from here you should just be able to create a task to run regularly.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download