views:

158

answers:

1

We do not have VS Test Edition. So we are running tests by specifying the dll which contains the tests:

 <TestContainer Include="$(OutDir)\%2a.Test.dll;$(OutDir)\%2a.Tests.dll"  />

This works OK, except for the Integration tests that need to read information from the configuration file (App.config)

Is their a way to specify the configuration file? Or a better way of doing it?

Thanks

Shiraz

+1  A: 

You can simply add a RunConfigFile property to the build as follows:

<RunConfigFile>$(SolutionRoot)\LocalTestRun.testrunconfig</RunConfigFile>
Richard Banks
Thanks for the reply, but adding this line gives the following error: error MSB4035: The required attribute "Include" is missing from element <RunConfigFile>.
Shiraz Bhaiji
You need to put it inside a PropertyGroup, i.e.<PropertyGroup> <RunConfigFile>...</RunConfigFile></PropertyGroup>
technophile