I have added a unit testing class and added the below references to my main class library in UWP project.
When I add a new class library and add my test classes there the test methods on the class library execute but the test methods on the main project throw the below exception.
System.InvalidOperationException: The following test container was not found: 'F:testWinAppbinx64DebugWinApp.exe'. This can be resolved by one or more of the following steps: 1. The test container does not exist on disk and the corresponding project might need to be built successfully. 2. For .NET Core based test projects, please ensure that a nuget package reference to "Microsoft.NET.Test.SDK" exists and that it uses the latest stable version. 3. For .NET based test projects, the project might be marked as a non-test project through an msbuild property, "IsTestProject". Please consider clearing it or set "<IsTestProject>true</IsTestProject>" in a "<PropertyGroup>" in the test project. at Microsoft.VisualStudio.TestWindow.Client.TestContainer.TestContainerProvider.<GetTestContainerAsync>d__42.MoveNext()
I tried the above approaches but no use.
I want to write my test classes inside my main class library which is executable any suggestions.I am trying this as I cannot add references to the main class library from the test project.
Source: Visual Studio Questions