How to refer to test files from Xunit tests in Visual Studio?

前端 未结 4 927
抹茶落季
抹茶落季 2021-02-03 21:34

We’re using Xunit for testing. We’re running our tests via the built-in Visual Studio 2013 Test Runner, using the Xunit plugin.

The issue is that some of the tests need

4条回答
  •  既然无缘
    2021-02-03 21:46

    After struggling with trying to identify directories and copy files (there seem to be multiple directories in play and it's hard to pin down the right one), I found that you can just turn off shadow copying; at that point the unit tests reference content in the bin/{configuration} folder again.

    To do so, follow the directions here. It seems to be as simple as setting shadowCopy to false:

    {
        "shadowCopy": false
    }
    

    I'm unclear whether this setting has any adverse interactions with other settings (e.g. appDomain). If anyone knows, your comments would be welcome.

提交回复
热议问题