Home > OS >  Error running Unit Tests for .NET MAUI Apps with .NET 6 RC2
Error running Unit Tests for .NET MAUI Apps with .NET 6 RC2

Time:10-17

Running dotnet test on a net6 unit test project that references a project using .NET MAUI (<UseMaui>true</UseMaui>) throws the following error:

Testhost process exited with error: It was not possible to find any compatible framework version 
The framework 'Microsoft.Maui.Core', version '**FromWorkload**' (x64) was not found. 

This error is happening with .NET 6 Release Candidate 2

CodePudding user response:

This is a known-issue in .NET 6 RC2:

https://github.com/dotnet/sdk/issues/21845

Currently, dotnet test does not yet work for projects using dotnet workloads. Since .NET MAUI is installed as a .NET Workload, this means that dotnet test will not yet work for .NET MAUI apps.

  • Related