2

today to start my application i use command dotnet AutoTEF.Service.dll.

but I would like that whenever I turn on the computer, the application starts automatically, without showing the console tab (to prevent the user from closing the application)

I tried to put the .exe file in windows startup, it opens whenever windows starts, but along with it comes the console tab and I would like to "hide" it

Leonardo Lima
  • 274
  • 1
  • 9
  • 1
    If you are targeting windows machines (and with .net core also other OS), why dont you simply wrap it in a windows service if no output to a console is needed? Way cleaner approach IMO – Aaron Feb 01 '23 at 14:16
  • I liked the idea, but I don't have access to the code, basically the dll file I want to run is a local server @Aaron – Leonardo Lima Feb 01 '23 at 14:17
  • Does this answer your question? [Is it possible to run a .NET Core console application silently (hide console window)?](https://stackoverflow.com/questions/38776695/is-it-possible-to-run-a-net-core-console-application-silently-hide-console-win) – JuanR Feb 01 '23 at 14:23
  • If you can't access to the code, this problem seems to have nothing to do with programming. – shingo Feb 01 '23 at 14:50
  • You can't avoid the console window when you use dotnet.exe to launch the app, it is a console mode app. A project generates a .exe file that replaces dotnet.exe. Edit the project file and change to `WinExe` and that .exe no longer produces a console window. – Hans Passant Feb 01 '23 at 19:32

0 Answers0