Visual Studio 2015: Run tests using MSTest in a Multi Threaded Apartment -
i cannot find way mstest in visual studio 2015. how specify apartment state mta running tests?
as per comment above in op's question, first need add test settings file.
in solution explorer right click on project, add... -> new item... -> test settings / test settings. , file can used in menu: test -> test settings -> select test settings file
open file using text editor , add / edit following value
<execution> <executionthread apartmentstate="mta" /> </execution>
your test settings file should this:
<?xml version="1.0" encoding="utf-8"?> <testsettings id="ba23bf15-d0c7-48fc-b300-6f04c3fbe665" name="testsettings1" enabledefaultdatacollectors="false" xmlns="http://microsoft.com/schemas/visualstudio/teamtest/2010"> <description><!--_locid_text="description1"-->these default test settings local test run.</description> <deployment enabled="false" /> <execution> <executionthread apartmentstate="mta" /> </execution> </testsettings>
finally, restart visual studio.
Comments
Post a Comment