A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/nunit/nunit-console/issues/1383 below:

Cannot execute .NET 8 tests that require the Desktop or ASP.NET runtime · Issue #1383 · nunit/nunit-console · GitHub

Executing a .NET 8 test assembly that references types from WinForms, WPF, or ASP.NET results in the following (or similar) exception:
Could not load file or assembly 'System.Windows.Forms, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e89'. The system cannot find the file specified.

The reason is that the nunit-agent only references the Microsoft.NETCore.App runtime in its runtimeconfig.json. Therefore a workaround is to manually add the missing runtimes (Microsoft.WindowsDesktop.App and/or Microsoft.AspNetCore.App) to the runtimeconfig.json.

As far as I know adding the WindowsDesktop runtime will lead to the agent no longer working on Linux. Ideally we could load the necessary runtimes dynamically depending on what dependencies the test assembly has, though I have no idea if that is even possible. The Microsoft documentation does not sound promising.

vladimir-bukreev, bouchraRekhadda and WindingWinter


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4