sqlmetal.exr을 사용하여 매핑 코드를 생성하고 있습니다. 나는 SQL 메탈을 사용하여 호출하고있다.sqlmetal.exe가 반환합니다. 'System.Data.Linq.Table'제네릭 형식을 사용하려면 1 개의 형식 인수가 필요합니다.
cd C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin
SqlMetal.exe /server:servername\SQL /database:mydb /code:mycode.cs
출력은 CS 파일과 명령 PROMT는 말한다 :
Microsoft (R) Database Mapping Generator 2008 version 1.00.30729 for Microsoft (R) .NET Framework version 3.5 Copyright (C) Microsoft Corporation. All rights reserved.
내 프로젝트에 파일을 추가하고 나는 다음과 같은 오류 얻을 그것을 구축 할 때 :
을Using the generic type 'System.Data.Linq.Table' requires 1 type arguments
내 mycode.cs 파일에 있습니다. System.Data.Linq 및 System.Data를 참조합니다. 이 문제를 해결하기 위해 누락 된 참조는 무엇입니까?
업데이트
Make sure you have System.Data.Linq in your GAC and that the assembly version is 3.5.0.0. Also make sure that's the version your project is referencing.
Double-check that your application's target framework hasn't somehow been changed to something other than 3.5. The Linq To SQL features only work with the 3.5 framework.
Linq를 SQl 또는 이와 비슷한 것으로 만드십니까? 귀하의 코드에서 Linq 문을 사용하고 있습니까? .cs 파일의 헤더에서 System.Linq를 제거하지 않으면 – MethodMan
예 SQL에 Linq를 수행하고 있으며 Linq 구문 인미 코드가 있습니다. – John
프로젝트를 컴파일하면 .. GAC의 System.Data.Linq입니다 ..? – MethodMan