Issue
I've searched high and low and can't find answer to this Exception. This question is the main one to come up when I search, but it doesn't address this issue.
[7/8/2018 6:22:22 PM Informational] Executing test method 'CoreScraper.FlyerScraper.GetAllCurrentFlyers'
[7/8/2018 6:22:22 PM Error] System.InvalidOperationException: The following TestContainer was not found 'C:\Users\Username\Documents\Visual Studio 2017\Projects\ProductApp\CoreScraper\bin\Debug\netcoreapp2.0\CoreScraper.dll'
at Microsoft.VisualStudio.TestWindow.Controller.TestContainerProvider.<GetTestContainerAsync>d__61.MoveNext()
"CoreScraper" is the name of the project. When I look in that ...\netcoreapp2.0\
folder, the CoreScraper.dll is definitely in there. I am running the test by right-clicking in the test method and selecting "Run Tests". The test ran fine the very first time I ran it, but it has given me this error ever since. I've closed out of Visual Studio and reopened, deleted the contents of bin\
, cleaned and rebuilt the project, etc.
Solution
The problem was that the NuGet package Microsoft.NET.Test.Sdk
was not installed. Installing this package in the project via the NuGet Package Manager solved the problem.
This wasn't intuitive to me since I have another unit test project that runs fine without the Microsoft.NET.Test.Sdk
package, but that project is .NET Framework 4.6.2.
Answered By - Josh Withee
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.