The thing is, i really dont want the console window to show up...but the solution should be running. My point here is, I want to keep the application running in the background, without any window coming up.
相关问题
- Generic Generics in Managed C++
- How to Debug/Register a Permanent WMI Event Which
- 'System.Threading.ThreadAbortException' in
- Bulk update SQL Server C#
- Should I use static function in c# where many call
Change the output type from Console Application to Windows Application,
And Instead of
Console.Readline/key
you can usenew ManualResetEvent(false).WaitOne()
at the end to keep the app running.Change your application type to a windows application. Your code will still run, but it will have no console window, nor standard windows window unless you create one.
Instead of
Console.Readline/key
you can usenew ManualResetEvent(false).WaitOne()
at last. This works well for me.Change the output type from Console Application to Windows Application. This can be done under Project -> Properties -> Application in Visual Studio:
Maybe you want to try creating a Windows Service application. It will be running in the background, without any UI.