如何使用Visual Studio 2012创建控制台应用程序(exe)? [英] How to create Console application (exe) using Visual Studio 2012?

查看:306
本文介绍了如何使用Visual Studio 2012创建控制台应用程序(exe)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我想创建控制台应用程序,以便我可以安排Windows任务调度程序中的exe在一段时间间隔内运行。我正在使用Visual Studio 2012,但在创建控制台应用程序时,VS2012正在使ClickOnce导致我在Windows任务调度程序中托管一个exe。



请帮忙:

1.如何使用Visual Studio 2012创建控制台应用程序(exe)?

2.如何在Windows任务计划程序中安排ClickOnce运行一段时间。



先谢谢!

Hi,

I would like to create console application so that I can schedule an exe in Windows task scheduler to run on some time interval. I am using Visual Studio 2012, but while creating console application, VS2012 is making it ClickOnce which cause me to host an exe in Windows task scheduler.

Please help on either:
1. How to create Console application (exe) using Visual Studio 2012?
2. How to schedule ClickOnce in Windows task scheduler to run for some time interval.

Thanks in Advance!

推荐答案

试试

如何在Windows任务计划程序中创建任务 [ ^ ]



点击应用程序时,应用程序应自动更新,您无需定期检查更新。
Try
How to create a task in Windows Task Scheduler[^]

Click once applications should automatically update when you strat the application and you need not check updates at intervals.


您只需创建简单的控制台应用程序ñ。在创建新项目时,它通常是项目类型。



ClickOnce用于打包部署。你不需要它。您只需编译应用程序,进入资源管理器中的项目文件夹,然后将.EXE和.DLL(如果有)复制到安装点并手动设置任务计划程序。



如果你真的想要自动化一些东西,你可以编写你的应用程序来接受命令行参数,为你设置任务计划程序工作。
You just create your simple Console Application. It's normally a project type when you create a new project.

ClickOnce is for a packaged deployment. You don't need it. You can simply compile your application, go into the project folders in Explorer and copy the .EXE and .DLL's, if any, to your installation point and setup the Task Scheduler manually.

If you really wanted to automate things a bit more, you could write your application to accept command line parameters that will setup the Task Scheduler job for you.


这篇关于如何使用Visual Studio 2012创建控制台应用程序(exe)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆