✅ No default Startup.cs file ASP.NET Core Project
Hello all, I am trying to follow an Entity Framework Tutorial. But the problem i face all the time is that i don't get the same default files and folders that the tutor has. Probably related to the difference of the Visual Studio Versions that we use but not sure. I've faced this problem couple of times and i want to know what is it that i am doing wrong.
Tutor has a Startup.cs file but i don't have it. Related Tutorial Video: youtube.com/watch?v=qkJ9keBmQWo&t=7944s Time: 16.12 My file Structure is in the image. I am using Visual Studio 2022 version 17.4.5
Tutor has a Startup.cs file but i don't have it. Related Tutorial Video: youtube.com/watch?v=qkJ9keBmQWo&t=7944s Time: 16.12 My file Structure is in the image. I am using Visual Studio 2022 version 17.4.5
12 Replies
In more recent versions of .NET, you simply get Program.cs
The new ASP pipeline is designed around this and the new hostbuilder syntax just doesn't need a dedicated startup file the way the old one did
Ok. So if i put the same codes that the tutor writes inside the Startup.cs file to my Program.cs file, would it work?
more or less
🙂
there are some changes. For example,
Startup
used to have a method called ConfigureServices
in the new hostbuilder thats just a lambdaIt is so bad that everthing changes so fast. I can not even follow a tutorial
Might seem that way, but I think its good
it means the language and our tools are evolving and becoming better
Yeah. Only if you know to work it around
the downside is ofc tutorials getting stale, but there are up to date tutorials, so try to find one of those instead
Ok. Thank you for your help.
I managed to google this one for example: https://www.youtube.com/watch?v=e2I7EzuCt1g
Ravindra Devrani
YouTube
Asp.net core mvc (7.0) in one video
asp .net core mvc course
A Roller-coaster ride to learn asp.net core mvc 7.0 framework. After following this tutorial, you will have
good understanding of web development with c# and dotnet core. You will be ready to develop your own projects.
We will also implement CRUD operations in asp.net core mvc with entity framework core 7.
Hit the 👍 lik...
👍🏻