Search code examples
visual-studiounit-testingnunitapple-m1visual-studio-2022

NUnit test cases not executing with M1 macbook and Visual Studio 2022


Recently added Visual Studio 2022 to M1 Macbook, so I tried to add new console app and NUnit class library project in this sample project

enter image description here

This TDDSample.UnitTest project's target framework is ".NET 6.0.6".

Everything is building successfully, but when I try to run this unit test project, it's showing the following error:

Testhost process exited with error: Error: an assembly specified in the application dependencies manifest (TDDSample.UnitTest.deps.json) was not found:
package: 'NUnit', version: '3.13.3'
path: 'lib/netstandard2.0/nunit.framework.dll'

Please check the diagnostic logs for more information.

Testhost process exited with error:
Error: An assembly specified in the application dependencies manifest (TDDSample.UnitTest.deps.json) was not found:
package: 'NUnit', version: '3.13.3'
path: 'lib/netstandard2.0/nunit.framework.dll'.

Please check the diagnostic logs for more information.

enter image description here


Solution

  • After deleting the unit test project and recreating the unit test project, issue able to fix, seems like some project cache problem enter image description here