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

  • SEARCH
  • Home
  • 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 8739375
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T10:55:37+00:00 2026-06-13T10:55:37+00:00

In VS 2010 and EF 4.4, you were able to move and edit .tt

  • 0

In VS 2010 and EF 4.4, you were able to move and edit .tt files when using the DBContext generator in Entity Framework such that your POCO objects where in a different project than your DBContext files.

See Here and Here for examples of what I am talking about.

In VS2012 / EF5 this seems not to be possible. the POCO classes are generated as a subitem under the EDMX file. The files cannot be copied from within Visual Studio. Moving the files from Explorer does not help because the files you moved get recreated at compilation time.

Am I missing something basic here?

I am not using any code generation items with EF5 (whereas I was with EF4.x.) Could that be the difference?

  • 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-13T10:55:38+00:00Added an answer on June 13, 2026 at 10:55 am

    In Visual Studio 2012, when you add an ADO.NET Entity Data Model (*.edmx), it includes the T4 templates for the context and model classes as sub-items of the EDMX file. For example, if you add MyModel.edmx, it will have 4 sub-items as follows:

    1. MyModel.Context.tt
    2. MyModel.Designer.cs (in C# projects)
    3. MyModel.edmx.diagram
    4. MyModel.tt

    MyModel.tt generates the POCO entities as sub-items. To generate the entities in a separate project, follow the following steps:

    1. Create a separate class project.
    2. Add new item, choose the “EF 5.x DbContext Generator” template. This creates the *.tt file. For example MyModel.tt.
    3. Edit the template file as follows:

      const string inputFile = @"MyModel.edmx"; // old value (remove)
      const string inputFile = @"..\MyOtherProjectName\MyModel.edmx"; // new value
      
    4. In your other project, expand the EDMX file and right-click on MyModel.tt, select Delete.

    That’s it. You’re done. You now have your model and context in one project and the entities in a separate project.

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

Sidebar

Related Questions

I've been able to make a query using MS Access 2010 that does just
I want to be able to develop code using Visual Studio 2010. I just
Has anybody been using WiX with 2010? I'm not able to get my install
I would like to be able to edit conflicts using DiffMerge but when I
I am using Delphi 2010 and I have a need to be able to
Using VB 2010 and SQL Server 2008: I am able to insert new rows,
I have a simple vb 2010 form that I want to be able to
Basically my problem is that I expect Visual Studio (2010 Professional) to be able
Visual Studio 2010, I was able to view xaml in designer. Now every xaml
SharePoint newbiew question, I have installed SharePoint 2010 and want to be able to

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.