You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After upgrading .NET 8 to the newest version and installing the newly required workloads? wasi-experimental, maui-tizen and updating maui-android the unit tests stopped working. Disclaimer: I don't need any maui-tizen package. We have no reference to it in our codebase. It may depend on the new .NET 8 version or on the workloads. IDK
To Reproduce
Create new Maui project from scratch
Write basic unit test for the App.xaml.cs like that:
MSBuild version 17.10.4+10fbfbf2e for .NET
Determining projects to restore...
Restored /home/dark/Workspace/Mrd/mrd-wetter-app/Test/Test.csproj (in 1.21 sec).
Restored /home/dark/Workspace/Mrd/mrd-wetter-app/Shared/Shared.csproj (in 1.24 sec).
Restored /home/dark/Workspace/Mrd/mrd-wetter-app/Maui/Maui.csproj (in 1.5 sec).
Restored /home/dark/Workspace/Mrd/mrd-wetter-app/Client/Client.csproj (in 3.69 sec).
Shared -> /home/dark/Workspace/Mrd/mrd-wetter-app/Shared/bin/Debug/net8.0/Shared.dll
Client -> /home/dark/Workspace/Mrd/mrd-wetter-app/Client/bin/Debug/net8.0/Client.dll
Client (Blazor output) -> /home/dark/Workspace/Mrd/mrd-wetter-app/Client/bin/Debug/net8.0/wwwroot
Maui -> /home/dark/Workspace/Mrd/mrd-wetter-app/Maui/bin/Debug/net8.0/Maui.dll
Test -> /home/dark/Workspace/Mrd/mrd-wetter-app/Test/bin/Debug/net8.0/Test.dll
[coverlet] _mapping file name: 'CoverletSourceRootsMapping_Test'
Test run for /home/dark/Workspace/Mrd/mrd-wetter-app/Test/bin/Debug/net8.0/Test.dll (.NETCoreApp,Version=v8.0)
Microsoft (R) Test Execution Command Line Tool Version 17.10.0 (x64)
Copyright (c) Microsoft Corporation. All rights reserved.
Starting test execution, please wait...
A total of 1 test files matched the specified pattern.
Failed CanBeCreated [62 ms]
EXEC : error Message: [/home/dark/Workspace/Mrd/mrd-wetter-app/Test/Test.csproj]
Initialization method Test.AppTest.Initialize threw exception. System.NullReferenceException: Object reference not set to an instance of an object..
Stack Trace:
at Microsoft.Maui.Controls.Application.<.ctor>b__7_0()
at System.Lazy`1.ViaFactory(LazyThreadSafetyMode mode) at System.Lazy`1.ExecutionAndPublication(LazyHelper executionAndPublication, Boolean useDefaultConstructor)
at System.Lazy`1.CreateValue()
at Microsoft.Maui.Controls.Application.get_SystemResources()
at Microsoft.Maui.Controls.ResourcesExtensions.GetMergedResources(IElementDefinition element)
at Microsoft.Maui.Controls.Application.set_MainPage(Page value)
at Maui.App..ctor() in /home/dark/Workspace/Mrd/mrd-wetter-app/Maui/App.xaml.cs:line 8
at Test.AppTest.Initialize() in /home/dark/Workspace/Mrd/mrd-wetter-app/Test/Maui/AppTest.cs:line 9
at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)
Failed! - Failed: 1, Passed: 0, Skipped: 0, Total: 1, Duration: 142 ms - Test.dll (net8.0)
/home/dark/Workspace/Mrd/mrd-wetter-app/Test/Test.csproj(24,9): error MSB3073: The command"dotnet test /p:CollectCoverage=true /p:CoverletOutputFormat=cobertura /p:ExcludeByFile=\"**/Program.cs,**/MauiProgram.cs,**/ExceptionHandler.cs,**/*.razor,**/*.g.cs\"" exited with code 1.
* Der Terminalprozess "dotnet 'msbuild', 'Test', '/t:testmsbuild', '/property:GenerateFullPaths=true', '/consoleloggerparameters:NoSummary'" wurde mit folgendem Exitcode beendet: 1.
The IDE (VS / VS Code/ VS4Mac) you're running on, and its version: Doesn't matter.
Operating Systems: debian / windows.
Previous dotnet version:
dotnet --version
8.0.204
Previous workloads:
dotnet workload list
Installed Workload Id Manifest Version Installation Source
--------------------------------------------------------------------
maui-android 8.0.7/8.0.100 SDK 8.0.200
Use `dotnet workload search` to find additional workloads to install.
After .NET upgrade wasi-experimental is now needed?:
Describe the bug
After upgrading .NET 8 to the newest version and installing the newly required workloads? wasi-experimental, maui-tizen and updating maui-android the unit tests stopped working. Disclaimer: I don't need any maui-tizen package. We have no reference to it in our codebase. It may depend on the new .NET 8 version or on the workloads. IDK
To Reproduce
Exceptions (if any)
Further technical details
dotnet --info
Previous dotnet version:
Previous workloads:
dotnet workload list Installed Workload Id Manifest Version Installation Source -------------------------------------------------------------------- maui-android 8.0.7/8.0.100 SDK 8.0.200 Use `dotnet workload search` to find additional workloads to install.
After .NET upgrade wasi-experimental is now needed?:
After that maui-tizen is now needed?:
The text was updated successfully, but these errors were encountered: