2012-07-30 2 views
3

문제점 : Entity Framework dll에 대한 LINQPad 연결을 제대로 설정할 수 없습니다. 나는 내 C# 프로젝트의 DLL을 가리키는 설정 대화 상자에서 엔티티 프레임 워크 DbContext POCO 드라이버 LINQPad 쿼리 오류

  • 을 사용하여 새로운 연결을 생성하기 시작
    1. 나는 LINQPad (v4.42.01)를 다운로드는 적절한 발견 DbContext 클래스

    Error: The type initializer for 'System.Data.Entity.Internal.AppConfig' thre an exception. An error occurred creating the configuration section handler for entityFramework: Could not load file or assembly 'EntityFramework, Version=4.3.1.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' on one of its dependencies. The system cannot find the file specified. (C:\Code\NET\FTI_Opp_Model\App.Config line 5)

  • 그래서 내가 @Sorax가에서했던 일을 시도 : 나는 테스트 버튼을 누르면 때
  • 다음 나는이 오류가 내 C# 프로젝트
  • 을의의 app.config에 설정 파일을 가리키는 this related question 그리고 내 EntityFramework.dll을 내 프로젝트의 NuGet에서 LINQPad.exe 폴더로 옮겼습니다. 이것은 조금 더 나아 갔고 시험은 이제 효과가있었습니다. LINQPad 패널의 연결이 내 밑에있는 모든 항목을 보여주기 때문에 나는 격려 받았다.

    [A]System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection cannot be cast to [B]System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection. Type A originates from 'EntityFramework, Version=4.3.1.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' in the context 'Default' at location 'C:\MarkSisson\LinqPad\EntityFramework.dll'. Type B originates from 'EntityFramework, Version=4.3.1.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' in the context 'LoadFrom' at location 'C:\Users\msisson\AppData\Local\Temp\LINQPad\vlnebssu\shadow_ujjvzp\EntityFramework.dll'.

    : 내부 예외 메시지와 함께

    The type initializer for 'System.Data.Entity.Internal.AppConfig' threw an exception.

    : 바로 내 차주 개체를 클릭하고 "Borrower.Take (100)"를 선택하면

    는하지만 LINQPad에서이 오류가 발생 어떤 아이디어?

  • 답변

    4

    latest beta 다운로드 -이 문제는 4.42.05에서 수정되었습니다.

    +0

    감사합니다. @Joe, 그랬습니다! 그리고 세계에 LINQPad를 주셔서 감사합니다 !!! – sisdog

    +0

    위대한 일을 .... –

    0

    Btw 조립식의 유형에도 여기에 포함 된 것이 포함되어 있다는 것을 이해하는 것이 중요합니다.

    다른 위치에서로드 된 두 개의 동일한 어셈블리가 같은 유형이 아닙니다!