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 4616696
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T02:01:11+00:00 2026-05-22T02:01:11+00:00

I can’t figure out why I suddenly get these compile errors. Let’s go through

  • 0

I can’t figure out why I suddenly get these compile errors. Let’s go through the steps I take:

1) I create a new MVC3 ASP.NET project (C#) using the Razor View engine

2) In my Models folder, I add an ADO.NET Entity Data Model, connect it to my database, and name it Database.edmx

3) I open my Database.edmx and select Add code generation item. I then add a Selft-Tracking Entity Generator and call it Model.tt

Everything is automaticly generated. When I hit build however, I get following compile errors:

Error   1   Cannot implicitly convert type 'System.Type' to 'MyOwnProject.Models.Type'  
Error   2   'MyOwnProject.Models.Type' does not contain a definition for 'IsValueType' and no extension method 'IsValueType' accepting a first argument of type 'MyOwnProject.Models.Type' could be found (are you missing a using directive or an assembly reference?) 
Error   3   'MyOwnProject.Models.Type' does not contain a definition for 'IsGenericType' and no extension method 'IsGenericType' accepting a first argument of type 'MyOwnProject.Models.Type' could be found (are you missing a using directive or an assembly reference?) 
Error   4   'MyOwnProject.Models.Type' does not contain a definition for 'GetGenericTypeDefinition' and no extension method 'GetGenericTypeDefinition' accepting a first argument of type 'MyOwnProject.Models.Type' could be found (are you missing a using directive or an assembly reference?)   
Error   5   Cannot implicitly convert type 'System.Type' to 'MyOwnProject.Models.Type'  
Error   6   'MyOwnProject.Models.Type' does not contain a definition for 'FullName' and no extension method 'FullName' accepting a first argument of type 'MyOwnProject.Models.Type' could be found (are you missing a using directive or an assembly reference?)   
Error   7   'MyOwnProject.Models.Type' does not contain a definition for 'FullName' and no extension method 'FullName' accepting a first argument of type 'MyOwnProject.Models.Type' could be found (are you missing a using directive or an assembly reference?)   

To me, this makes no sense at all. I’ve created new projects with a database this way a dozen times and now, all of a sudden, I get these compile errors. It doesn’t make a difference what I name the database, edmx or models. It also makes no difference wether the database sits in the App_Data folder, or on an external location on my hard drive.

Does anyone have any idea why this is failing? Thanks.

  • 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-05-22T02:01:11+00:00Added an answer on May 22, 2026 at 2:01 am

    It looks like there is a table TYPES in your database that results in an entity class Type. This class hides the class System.Type. Change the name of your entity to something else, e.g. TypeEntity.

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

Sidebar

Related Questions

Can I get a 'when to use' for these and others? <% %> <%#
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
Can anyone help me figure out how I could simplify this code, without using
Can you cast a List<int> to List<string> somehow? I know I could loop through
Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) I have a Rails
Can anyone pls let me know the exact c++ code of case sensitive comparison
Can i get the source code for a WAMP stack installer somewhere? Any help
I need to solve the following question which i can't get to work by
Can anybody please tell me how to get ReSharper to replace multiple instances (instead
Can anyone help me trying to find out why this doesn't work. The brushes

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.