TeamCity针对错误版本的.Net构建(4.5而不是4.0)

TeamCity针对错误版本的.Net构建(4.5而不是4.0),.net,build,teamcity,.net,Build,Teamcity,我正在使用TC构建VS 2012解决方案。当我的项目都以.NET4.0为目标时,它看起来像是针对.NET4.5.1构建的。有没有办法让它强制使用特定版本的.NET 以下是我在TC中的错误: Billing\UpgradeTrial.cs(14, 10): error CS0104: 'CreditCardAttribute' is an ambiguous reference between 'System.ComponentModel.DataAnnotations.CreditCardAtt

我正在使用TC构建VS 2012解决方案。当我的项目都以.NET4.0为目标时,它看起来像是针对.NET4.5.1构建的。有没有办法让它强制使用特定版本的.NET

以下是我在TC中的错误:

Billing\UpgradeTrial.cs(14, 10): error CS0104: 'CreditCardAttribute' is an ambiguous reference between 'System.ComponentModel.DataAnnotations.CreditCardAttribute' and 'DFT.Framework.Validation.CreditCardAttribute' 

.NET 4.5中添加了
CreditCardAttribute
。我有自己的
CreditCardAttribute
,我一直在使用。

你找到解决方案了吗?我也有同样的问题。@anthonybell我刚刚把我的班级改名为其他班级