MSTest cannot find the assembly

前端 未结 4 1458
我在风中等你
我在风中等你 2020-12-19 01:13

I was using MSTest

and i use command mstest /testsettings:local.Testsetting /testcontainer:folder\\obj\\Debug\\test.dll

and this is the output,

4条回答
  •  失恋的感觉
    2020-12-19 01:50

    easiest way. Just add

     string value = AppDomain.CurrentDomain.BaseDirectory;
    

    to your code (at the start point of your test method) Add a breakpoint to the newly added code and check what is the path of value variable.

    continue the test process and after everything get success navigate to the folder of values variable.

    You might see all the dlls inside the folder. Just copy them and past ware ever you want and execute the project dll using mstest command line tool.

    set mstestPath="C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE"
    
    %mstestpath%\mstest /testcontainer:CodedUITestProject1.dll
    

提交回复
热议问题