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 887495
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T13:14:22+00:00 2026-05-15T13:14:22+00:00

I have found that DeploymentItem [TestClass(), DeploymentItem(@TestData\)] is not copying my test data files

  • 0

I have found that DeploymentItem

[TestClass(), DeploymentItem(@"TestData\")]

is not copying my test data files to the same location when tests are built and run on different machines.

The test data files are copied to the “bin\debug” directory in the test project on my machine, but on my friend’s machine they are copied to “TestResults\name_machine YY-MM-DD HH_MM_SS\Out”.

The bin\debug directory on my machine can be obtained with the code:

string appDirectory = 
Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location);

and the same code will return TestResults\*name_machine YY-MM-DD HH_MM_SS*\Out on my friends PC.

This however isn’t really the problem. The problem is that the test data files I have made have a folder structure, and this folder structure is only maintained on my machine when copied to bin\debug, whereas on my friends machine only the files are added to the TestResults\*name_machine YY-MM-DD HH_MM_SS*\Out directory. This means that tests will pass on my machine and fail on his!

Is there a way to ensure that DeploymentItem always copys to the bin\debug folder? Or a way to ensure that the folder structure will be retained when DeploymentItem copies the files to the TestResults\*name_machine YY-MM-DD HH_MM_SS*\Out folder?

  • 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-05-15T13:14:22+00:00Added an answer on May 15, 2026 at 1:14 pm

    After playing around for a while, it looks like the best way to deal with it is to ensure that for every subdirectory, you add a new DeploymentItem making sure that you specify the “outputDirectory”, like so:

    [TestClass(), DeploymentItem("TestData\\", "TestData"),
    DeploymentItem(@"TestData\\SubDir\\", "TestData\\SubDir")]
    

    This allows the tests to run on your machine – hope this helps someone!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 504k
  • Answers 504k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer The legal approach is to subscribe to IMDB's web services,… May 16, 2026 at 3:11 pm
  • Editorial Team
    Editorial Team added an answer Since your question has changed I'll add another answer. It… May 16, 2026 at 3:11 pm
  • Editorial Team
    Editorial Team added an answer You are correct. Tokens usually correspond one-to-one with lexemes. Try… May 16, 2026 at 3:11 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

I have found that my HTML is, to be honest, very clunky. Small, simple
I have found that there is generally a singe type or namespace that takes
I have found that when I need to rename a Java class (and therefore
I have found that when using Subclipse to edit conflicts, all my syntax color
I have found that how to determine what columns are primary key column of
I have found that I often have to implement some sort of a scheduler
I have found that datagrid columns can be dynamically created and bound in Silverlight.
When I run my Unit Tests, all tests pass, but instead of Test run
Problem: SQLite assembly referenced in my DAL assembly does not get copied to the
I am making an app that allows the user to set an alarm based

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.