I'm a newcomer to Xunit and I'm trying to run it via MSBuild. Following the documentation, here is my build script so far:
<UsingTask AssemblyFile="..\packages\xunit.runner.msbuild.*\build\*\xunit.runner.msbuild.dll"
TaskName="Xunit.Runner.MSBuild.xunit"/>
<Target Name="Test">
<xunit Assemblies="bin\$(Configuration)\Core.dll"/>
</Target>
When I run MSBuild on the .csproj, however, it gives me the following error:
error MSB4127: The "Xunit.Runner.MSBuild.xunit" task could not be instantiated from the
assembly "C:\Users\James\libvideo\tests\Core\packages\xunit.runner.msbuild.2.0.0\build\portable-net45+win+wpa81+wp80+monotouch+monoandroid+Xamarin.iOS\xunit.runner.msbuild.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
'Xunit.Runner.MSBuild.xunit' to type 'Microsoft.Build.Framework.ITask'.
I've checked that the path it's looking for exists, and I've also followed the steps here. No luck, however. What can I do to resolve this?