How to set the working directory for MS Test projects

前端 未结 3 1744
隐瞒了意图╮
隐瞒了意图╮ 2021-02-07 11:32

how can I set the working directory for MS Tests projects, like I can do it for normal application projects? My Component that is tested need to access some config files that ar

3条回答
  •  有刺的猬
    2021-02-07 11:54

    Acarlon's suggestion does not work when you select Run All tests from Test Explorer in Visual Studio 2012.

    The default path you would get is something like ...\TestResults\Deploy_2014-01-13 14_48_20\Out folder.

    Because of this there may be possibility that your DB would not be accessible when entity would try to open connection for running entity related Test.

    In my case I am using SQL CE which is set as resource file and always compiled and gets itself dropped into the Bin/Debug/Resource folder.

提交回复
热议问题