Foomf
I made a new project with "dotnet new" and VS Code already doesn't understand the project structure.
I did
dotnet new -n MyApp
, cd'd into the directory, and did dotnet build
and dotnet run
to make sure everything is working correctly. It builds and runs fine, as expected. Opening the folder in vs code, and it can't generate a launch.json
at all.
Here's a link to the code, does your VS Code know how to make a launchjson? https://github.com/MrZoraman/MyApp
I've let VS Code generate tons of launch.json
files and it usually figures out all the stuff on its own. I feel like I'm having a stroke here, why all of the sudden is VS Code only able to generate this?:
Thanks for any and all help!31 replies
❔ ServiceBase question: is Main() or OnStart() my entry point?
I have a program that extends
ServiceBase
. I am given a method to override called OnStart()
. When my app is running as a windows service, is this the entry point? The tutorial I followed also has me calling ServiceBase.Run()
in my Main()
method.
The reason I'm asking is because I'm trying to decide where I should set up my logger. My app also needs to run as a console app. My Main()
method has a Environment.UserInteractive
branch. If user interactive, I run as a console app. If not user interactive, I call ServiceBase.Run()
. If this is the incorrect approach, feedback would be much appreciated!4 replies