Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 77050

Running unit tests for .NET Standard Library from console

$
0
0

Hey,

I just converted my xamarin forms PCL to a .NET Standard Library. I then re-created my Unit Test project.

I tried both, xunit and nunit for the Unit Test Project. In both cases the result is the same:

  • I can run the unit tests from visual studio without problems
  • When I try to run them from the terminal I get:
...> dotnet test
Build started, please wait...
<home>\.nuget\packages\xamarin.forms\2.5.0.121934\build\netstandard1.0\Xamarin.Forms.targets(55,3): error MSB4062: The "Xamarin.Forms.Build.Tasks.GetTasksAbi" task could not be loaded from the assembly <home>\.nuget\packages\xamarin.forms\2.5.0.121934\build\netstandard1.0\Xamarin.Forms.Build.Tasks.dll. Could not load file or assembly 'Microsoft.Build.Utilities.v4.0, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the file specified. Confirm that the <UsingTask> declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask. [<project-file-of-xamarin-project>]

Is there any unit-test type that works with this project from the console?
I want to run my unit tests on a jenkins!

Thanks!
Nathan


Viewing all articles
Browse latest Browse all 77050

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>