Search code examples
xamarin.uitest.net-8.0xamarin-test-cloudappcenter

Error when uploading Xamarin UI Test in .NET 8


I've got a Xamarin UI test project that I've just updated to .NET 8 (from 4.6.1). I've updated the nuget packages to the latest version also. The tests build and run locally with no issue.

Packages:

  • Microsoft.NET.Test.Sdk 17.8.0

  • NUnit 3.14.0

  • NUnit3TestAdapter 4.5.0

  • Xamarin.UITest 4.3.1

I'm trying to upload with the app center cli using the command "appcenter test run uitest". I've got the "uitest-tools-dir" parameter set to the build folder of the project as this spits out "test-cloud.exe" from the Xamarin.UITest package.

When running the command in powershell, I get the following error :

System.IO.FileNotFoundException: Could not load file or assembly 'netstandard, Version=2.1.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. The system cannot find the file specified.
   at Xamarin.UITest.CLI.Program.Main(String[] args)
  • That seemed a simple enough error to fix, right? I've tried adding the below to my csproj. This just results in a warning icon in visual studio under the dependencies tree for that reference.

    <ItemGroup>
        <Reference Include="netstandard" />
    </ItemGroup>
    
  • Tried adding a reference to the NETStandard.Library nuget package

  • Adding this to my csproj:

    <CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
    

None of these have worked (still no netstandard dll in my build output). I'm wondering if I'm missing something simple here? Any ideas?


Solution

  • As far as I know, they have not yet configured Xamarin.UITest to .Net 8 and that work is being worked on now in order to make Xamarin.UITest compatible with .Net 8. However, it is compatible with .Net 6 and you should be able to change your project to .Net 6 till Xamarin.UITest does the updates needed for .Net 8