Foomf
Foomf
CC#
Created by Foomf on 12/2/2024 in #help
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?:
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": []
}
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": []
}
Thanks for any and all help!
31 replies
CC#
Created by Foomf on 2/23/2023 in #help
❔ 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