Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8573907
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T19:21:24+00:00 2026-06-11T19:21:24+00:00

I have a set of unit tests which I would like to run in

  • 0

I have a set of unit tests which I would like to run in Team Foundation Build. These tests read a set of files from the file system, and check for errors. I can’t move the test file data into my test DLL, because the whole point is to check that these files, which are shipped/bundled in the installer, are valid.

When I run tests locally this works fine, because the tested DLL has a dependency on these files, and as such, Visual Studio copies them over when building the test DLL. But when run on the build server, the build server copies the test DLL into a different directory, along with the assemblies that it references directly or indirectly as declared in its metadata. As a result, the tests can’t find the files under test, because they aren’t declared as “dependent assemblies” (and can’t be).

How can I fix this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T19:21:25+00:00Added an answer on June 11, 2026 at 7:21 pm

    Within the .testsettings dialog there is a category called Deployment. If you enable this you can add files and or directories which you want to deploy with the build.

    Assuming you’re using MSTest, in addition you put a [Microsoft.VisualStudio.TestTools.UnitTesting.DeploymentItem(path)] attribute, one per file, on the test method that will use the dependencies.

    E.g:

    [TestMethod]
    [DeploymentItem("TestData/file1.xml")]
    [DeploymentItem("TestData/file2.xml")]
    public void IntegrationTestMethod()
    {
        //...
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a set of legacy unit tests, most of which are Spring AbstractTransactionalJUnit4SpringContextTests
I have a set of mstest unit tests, which use Trace.Write to collect some
I have an ant task set up like so: <target name=unit-test description=unit tests depends=compile-tests>
I have a set of tests implemented with unittest, which are run automatically. I
I have a method which uses StreamReader which i would like to unit test.
I have a set of unit tests, each with a bunch of methods, each
I'm using Google Test Framework to set some unit tests. I have got three
I have a class which has some unit tests, but when I am running
The aim I would like to set such size for the DataGrid (standard, from
HI, I want to have set configuration settings for a unit test project that

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.