19691

Project Type for simple headless windows application

Question:

I am creating a Windows app that will run on Windows 2012r2 and soon be migrated to newer servers.

This app will be started from task scheduler and run several times a day.

It will start up, monitor a file system and, based on what it finds on the file system, will update a database.

I want it to run even when the user is not logged in.

I don't want it to pop up a console window while it is running because I inherited some applications that are doing that and it is quite annoying.

I will be writing it in C#.

In Visual Studio 2017 which project type should I choose?

<ol><li>Blank App</li> <li>WPF App</li> <li>Console App (.NET Core)</li> <li>Console App (.NET Framework)</li> <li>Other?</li> </ol>

I am new to Windows development so please use terminology that I will see in Visual Studio 2017 so I can understand the answer.

[EDIT] I changed Console App (.Net Standard) to (.Net Framework) because Standard does not exist. I was suffering from temporary insanity when I listed that as an option.

Answer1:

Since there is no user interface, and you are just monitoring the file system and updating a database and running on a Window Server I would recommend: 4. Console App (.NET Framework), and in the Application/Properties for the app set the output type to Windows application and this will prevent any type of console window from showing. This is the type of application I use on a frequent basis to accomplish tasks very similar to what you are describing. The security settings you have for the user account logging into the server will determine if you can run it whether the user is logged in or not.

Recommend

  • dojo 1.9: what annotation does declare.safeMixin add?
  • iOS two views cover exactly half of parent view
  • Can't close mysql connections in R
  • What is wrong with this emulation of CMPXCHG16B instruction?
  • Visual Studio not stopping on an exception being thrown
  • Add log separators to all fixtures in unittests
  • Laravel 5.2 Auth::check() on exception pages (layouts)
  • Eclipse dark color theme fixes
  • UIPickerView without IB?
  • Multicolor tooltip in Qt
  • Mercurial: Identify file name after rename
  • How do I translate LR(1) Parse into a Abstract syntax tree?
  • back button function for phonegap windows phone 7
  • Can long-polling be achieved in Restlet by just making the thread sleep?
  • Retaining data after updating application
  • Azure table store snapshot/backup capability
  • TFS 2015 - Waiting for an agent to be requested
  • How to make JSON.NET deserialize to Microsoft Date Time?
  • How to get current document uri in XSLT?
  • Ajax Upload File: $_FILES is empty but files exists in request header
  • SharedPreferences or SQLite Database?
  • How to suppress a dialog
  • How to run “Deployd” on port 80 instead of port 5000 in webserver.
  • Alert pop up with LWUIT
  • Disabling Alt-F4 on a Win Forms NotifyIcon
  • script to move all files from one location to another location
  • Can a Chrome extension content script make an jQuery AJAX request for an html file that is itself a
  • ActionScript 2 vs ActionScript 3 performance
  • Upload files with Ajax and Jquery
  • How can I estimate amount of memory left with calling System.gc()?
  • Apache 2.4 - remove | delete | uninstall
  • How to pass list parameters for each object using Spring MVC?
  • AngularJs get employee from factory
  • Proper way to use connect-multiparty with express.js?
  • How can I get HTML syntax highlighting in my editor for CakePHP?
  • How to CLICK on IE download dialog box i.e.(Open, Save, Save As…)
  • Authorize attributes not working in MVC 4
  • Busy indicator not showing up in wpf window [duplicate]
  • Python/Django TangoWithDjango Models and Databases
  • Net Present Value in Excel for Grouped Recurring CF