Saturday, June 18, 2011

VS 2010 TestSettings - Ignore Dependent Assemblies

The testsettings in VS2010 tries to copy the dependent assemblies to the test output directory by default.
However, there might be situations where you would not want to copy the dependent assemblies. These dependent assemblies can be ignored by using the attribute ignoredDependentAssemblies

The below example shows how to ignore the dependent assemblies A, B and C and also to add a deployment item a.csv. You will need to restart Visual Studio after making this change.

<?xml version="1.0" encoding="UTF-8"?>
<TestSettings name="Local" id="46d8e12e-16c0-4ba4-9dd9-eda66fb2ccc6" xmlns="
http://microsoft.com/schemas/VisualStudio/TeamTest/2010">
  <Description>These are default test settings for a local test run.</Description>
  <Deployment ignoredDependentAssemblies="(?i:^A|^B|^C)">
    <DeploymentItem filename="TestProjectA\a.csv"/>
  </Deployment>
  .....

No comments:

Post a Comment