Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8478565
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T18:46:51+00:00 2026-06-10T18:46:51+00:00

When I create a new ADO.NET Entity Data Model in Visual Studio 2012, it

  • 0

When I create a new ADO.NET Entity Data Model in Visual Studio 2012, it gives me a free EF 5.x DbContext Generator Code Generation Item. In other words, if I expand my edmx item in Solution Explorer, I see a pair of .tt files that, in theory, should magically generate .cs files containing my POCO classes and my DbContext class.

My problem is that I can’t convince Visual Studio to actually create the classes. Model1.tt contains an empty Model1.cs, and Model1.Context.tt contains a DbContext object but it doesn’t contain the DbSet<> collections associated with my entities.

If I remove the two .tt items from my solution, then right-click the designer surface, select Add Code Generation Item, and add an EF 5.x DbContext Generator then everything works like it should and I get the generated classes.

I’ve verified that the *.tt files that I removed are, in fact, identical to the ones that I’ve added back in.

Any words of wisdom? Is this a bug, or am I missing something?

Bob

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T18:46:52+00:00Added an answer on June 10, 2026 at 6:46 pm

    Check this. There is a bug in VS2012 which causes this behavior when EDMX is not in the project root. So you can either use your workaround and add templates manually or you must manually trigger custom tool to force the code generation as described in the link.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have created a new MVC3 project and used the ADO.NET Entity Data Model
Now that I have built a database. Visual Studio 2008 SP1’s ADO.NET Entity Framework
Let's say I have a northwind database and I use ADO.NET Entity Data Model
Consider a Visual Studio 2010 project whose requirement is to model the data using
I am stating out with entity framework. I have created my ADO.NET Entity Model
In my new project I am asked to use ADO.NET Entity framework and WCF
I am a new to asp.net mvc c#, Now I created an ADO.NET Entity
I am trying to create a WPF project with MVVM and ADO.Net Entity Framework.
Code to create new form instance of a closed form using form name I
I can't create New Project on my Visual Web Developer 2008 Express with SP1.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.