.Net 4.5가 설치된 Server 2012에서 .NET 4.0 웹 프로젝트를 빌드 중입니다. TeamCity에서 Psake를 사용 중이며 CS0246이 NotMapped을 찾을 수 없다는 메시지를 받고 CS0433은 DataAnnotations에 대해 두 개의 DLL을 찾았다 고 말합니다.Server 2012에서 .NET 4.0 웹 사이트를 구축 할 때 CS0246 및 CS0433 오류가 발생합니다.
클래스는 다음과 같습니다
using System.ComponentModel.DataAnnotations.Schema;
public abstract class Order
{
[NotMapped]
public decimal TaxPercentage { get; set; }
}
전체 오류는 다음과 같습니다
Ordering\Order.cs(105,8): error CS0246: The type or namespace name 'NotMapped' could not be found (are you missing a using directive or an assembly reference?) [C:\TeamCity\buildAgent\work\71c853cb9b4c108\Code\Models\Model.csproj]
Ordering\Order.cs(105,8): error CS0433: The type 'System.ComponentModel.DataAnnotations.Schema.NotMappedAttribute' exists in both 'c:\TeamCity\buildAgent\work\71c853cb9b4c108\Code\packages\EntityFramework.5.0.0\lib\net40\EntityFramework.dll' and 'c:\Windows\Microsoft.NET\assembly\GAC_MSIL\System.ComponentModel.DataAnnotations\v4.0_4.0.0.0__31bf3856ad364e35\System.ComponentModel.DataAnnotations.dll' [C:\TeamCity\buildAgent\work\71c853cb9b4c108\Code\Models\Model.csproj]
빌드는 Psake하지 인 TeamCity를 사용하여 Windows 8에서 잘 작동합니다. 어떤 아이디어가 이것을 해결하는 방법?
업데이트 : 나는 더 작은 테스트 project을 만들었으며 이것은 2012 년에 훌륭하게 만들어집니다. 내 주요 프로젝트에 이상한 점이있는 것 같습니다.
로컬 버전의 EF와 원격 TC 버전을 확인할 수 있습니까? – gustavodidomenico
둘 다 4.4.20627.0입니다. –
GAC 정보는 로컬 컴퓨터에 설치된 EF입니까? – gustavodidomenico