Need to run Xamarin.Android specific Unit Tests using Github Actions. Everything builds OK, but when I trying to dotnet test
got the following error:
error MSB4019: The imported project "C:\Program Files\dotnet\sdk\3.1.300\Xamarin\Android\Xamarin.Android.CSharp.targets" was not found. Confirm that the expression in the Import declaration "C:\Program Files\dotnet\sdk\3.1.300\Xamarin\Android\Xamarin.Android.CSharp.targets" is correct, and that the file exists on disk.
My script is:
- name: UnitTests.Droid
run: |
dotnet restore
nuget restore
cd MobileAccess.UnitTests.Droid
msbuild MobileAccess.UnitTests.Droid.csproj /verbosity:normal /t:Rebuild /p:Configuration=Release
dotnet test
P.S. Solution-specific Unit Tests that do not affect Android run correctly