Я сталкиваюсь с ошибкой, перечисленной ниже, при выполнении задачи NAnt, которая компилирует проект .Net 3.5 с CC.Net:
[solution] C:\WINDOWS\Microsoft.NET\Framework\v3.5\Microsoft.Data.Entity.targets(40,5): Error MSB4127: The "EntityDeploy" task could not be instantiated from the assembly "C:\WINDOWS\Microsoft.NET\Framework\v3.5\Microsoft.Data.Entity.Build.Tasks.dll". Please verify the task assembly has been built using the same version of the Microsoft.Build.Framework assembly as the one installed on your computer and that your host application is not missing a binding redirect for Microsoft.Build.Framework. Unable to cast object of type 'Microsoft.Data.Entity.Build.Tasks.EntityDeploy' to type 'Microsoft.Build.Framework.ITask'.
[solution] C:\WINDOWS\Microsoft.NET\Framework\v3.5\Microsoft.Data.Entity.targets(40,5): Error MSB4060: The "EntityDeploy" task has been declared or used incorrectly, or failed during construction. Check the spelling of the task name and the assembly name.
[solution] Project 'CAPS.UnitTests.NETVersion3' failed!
[solution] Continuing build with non-dependent projects.
Я быстро укажу, что мне понадобится ссылка на сборку в моем файле app.config:
Ссылки в моем проекте имеют значение атрибута «Runtime Version» v2.0.50727
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Microsoft.Build.Framework" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-99.9.9.9" newVersion="3.5.0.0"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
Однако ошибка все еще сохраняется в моем случае.
Приветствие.