代码之家  ›  专栏  ›  技术社区  ›  Josh Withee

使用.NET核心MSTEST运行单元测试:“未找到以下测试容器…”

  •  5
  • Josh Withee  · 技术社区  · 6 年前

    我搜索了高低,找不到这个例外的答案。 This question 是我搜索时出现的主要问题,但它没有解决这个问题。

    [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()
    

    “coresraper”是项目的名称。当我看的时候 ...\netcoreapp2.0\ 文件夹,coresraper.dll肯定在里面。我通过右键单击测试方法并选择“运行测试”来运行测试。我第一次运行测试时它运行得很好,但从那以后它就给了我这个错误。我关闭了Visual Studio,重新打开并删除了 bin\ 清理重建工程等。

    3 回复  |  直到 6 年前
        1
  •  9
  •   Josh Withee    6 年前

    Microsoft.NET.Test.Sdk

        2
  •  3
  •   Sandy    6 年前

        3
  •  2
  •   Ali Umair    6 年前

    Microsoft.NET.Test.Sdk MSTest.TestFramework MSTest.TestAdapter

    推荐文章