Reputation: 3707
Obviously I'm still new with .Net Core with this question so bare with me. I created a .Net Core Console Application through Visual Studio 2019 and it did not create a Startup.cs class automatically. All it created was Programs.cs file. From what I understand and reading there has to be a Startup class since it is effectively the Global.asx file in .Net framework.
First I want to make sure I didn't miss a step that would have created the Startup automatically? Second, I'm assuming I can copy the code out of one of my test MVC Core applications and just use that?
Same question with Appsettings.json, I'm assuming I can just copy one from another project?
Upvotes: 1
Views: 2685
Reputation: 57
Upvotes: 0
Reputation: 16049
When you create .net core console application then your entry point will be Program.cs
file Main()
function
When you create MVC application in .net core then it creates StartUp.cs file as an entry program and application.json
file for configuration.
Console application does not create both files for you.
Upvotes: 1