I’m just getting into NUnit and are trying to write some simple test in Visual Studio.
Well, so far so good. But when I try to run a test, I get:
System.InvalidOperationException : Can't find 'D:\GoogleDrive\Projects\SL_TECH\DEV\Assets\SL.Assets.Core.Test\bin\Debug\net8.0\testhost.deps.json'. This file is required for functional tests to run properly. There should be a copy of the file on your source project bin folder. If that is not the case, make sure that the property PreserveCompilationContext is set to true on your project file. E.g '<PreserveCompilationContext>true</PreserveCompilationContext>'. For functional tests to work they need to either run from the build output folder or the testhost.deps.json file from your application's output directory must be copied to the folder where the tests are running on. A common cause for this error is having shadow copying enabled when the tests run.
Shouldn’t this file be generated on build?