Diwesh Saxena
Diwesh Saxena

Reputation: 153

"Models" folder missing in C#.net Web App project

I am trying to create my first Web project and following the demo on the Microsoft Website they show that when a default web form is selected it adds bunch of default folders and files to the project .

I followed it from the start , but "Models" folder is missing in my project solution .

My question is that does "Models" folder contain some classes and files before or if it is missing i can simply create one manually by following the "Add folder" option . Or am i missing a NuGet package ?

Upvotes: 2

Views: 3545

Answers (2)

pryanik
pryanik

Reputation: 73

Finally, I figured out that if you don't choose the option for signing in to your freshly created web app through individual accounts, that is if you leave it blank , you won't have Models folder in your project, the reason is that when you check the mentioned option, VS will create a class for you called IdentityModels.cs. So, if you want to have folder Models, in the section Change authentification, choose individual accounts.

Upvotes: 2

Amit Sachdev
Amit Sachdev

Reputation: 1

If you're not using MVC, you may not see the "Models" folder by default in newer VS versions. You should be ok ignoring the models folder and creating classes in root as long as the relevant references are added in your project, for example based on your tutorial, you maybe missing the data entity, data entity design, data entity linq. So for steps you can try creating these classes in root and if the doesn't succeed, try adding these com references. Go to references, Assemblies, Framework, System.Data.Entity, System.Data.Entity.Design and System.Data..LINQ.

Upvotes: 0

Related Questions