When EF is used in vs2010, CS0012: type "System. Data. Objects. DataClasses. EntityObject" is defined in the unreferenced assembly.

Source: Internet
Author: User
After checking the information on the Internet, you can configure System. Data. Entity, Version = 4.0.0.0, Culture = neutral, PublicKeyToken = b77a5c561934e089 "in web. config"

Invalid

 

Solution: copy the System. Data. Entity. dll file to the C: \ Program Files (x86) \ Reference Assemblies \ Microsoft \ Framework \. NETFramework \ v4.0 directory.

Just go to the bin directory of the website.

  Compilation error

Note:An error occurs during compilation of resources required to provide services to this request. Check the following error details and modify the source code as appropriate.

Compiler error message:CS0012: the type "System. Data. Objects. DataClasses. EntityObject" is defined in an unreferenced assembly. You must add references to the assembly "System. Data. Entity, Version = 4.0.0.0, Culture = neutral, PublicKeyToken = b77a5c561934e089.

SOURCE error:

 
Row 34: Row 35: Row 36: public class _ Page_Views_Home_Index_cshtml: System. Web. Mvc. WebViewPage <List <MvcModel. ContactInfo> {row 37: row 38: # line hidden


Source File:C: \ Windows \ Microsoft. NET \ Framework \ v4.0.30319 \ Temporary ASP. NET Files \ root \ 0b73bef1 \ b9073c89 \ App_Web_index.cshtml.a8d08dba.Row:36

When EF is used in vs2010, CS0012: type "System. Data. Objects. DataClasses. EntityObject" is defined in the unreferenced assembly.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.