Ask a questionAsk a question
 

AnswerTeam Build and Test Config Deployment Item Issue

  • Wednesday, June 21, 2006 5:26 AMdotnetwizkid Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    When we add a deployment folder to a test config the items will deploy without any issue locally. However, when we use the same test run config in a team build the build fails to deploy the items correctly and the build fails to run the tests. To reproduce this create a solution with a test project and a DB project. Add some files to the Create Scripts folder in the DB project. Add a unit test to the test project that passes. Under Solution Items right click on the test run config and choose properties. Add the Create Scripts folder from the DB project to the deployment items (Note: add the folder not the individual items). Run the unit test to see if it passes and check the output folder for the test result to see that the files were deployed. Now create a test list In the test manager and add the unit test to the list. Save all and check in to VSTF. Add a team build and include the test list from the solution. Run the build and it will fail. Any help is appreciated.

Answers

  • Wednesday, June 21, 2006 10:08 AMa_Damir_ Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    dotnetwizkid,
     
    I was having the same problem and i guess that is a bug in the msbuild ???
    Anyway here is how to solve this issue:
     
    1. Checkout the localtestrun.testrunconfig config file from Source Control window
    2. Open the localtestrun.testrunconfig with a text (code) editor
    3. Find your (script) folder in the file
     
      <deploymentItems type="Microsoft.VisualStudio.TestTools.Common.DeploymentItemCollection">
       <m_container type="System.Collections.Hashtable">
        <key type="Microsoft.VisualStudio.TestTools.Common.DeploymentItem">
         <path type="System.String">MyProject\DBScriptFolder\</path>
         <outputDirectory type="System.String" />
        </key>
        <value />
       </m_container>
      </deploymentItems>
     
    4. Delete the '\' (backslash) from the end of that string
    5. Save and check-in
     
    This should solve the problem of folders not being copied on the build machine. This solution is also working locally when you run the unit tests.
     
    Cheers,
    Damir
  • Friday, October 20, 2006 7:54 PMMichael Koltachev - MSFT Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer

    We fixed this issue. The fix is going to be in Visual Studio SP1.

    Thank you,
    Michael Koltachev
    VSTS

All Replies

  • Wednesday, June 21, 2006 10:08 AMa_Damir_ Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    dotnetwizkid,
     
    I was having the same problem and i guess that is a bug in the msbuild ???
    Anyway here is how to solve this issue:
     
    1. Checkout the localtestrun.testrunconfig config file from Source Control window
    2. Open the localtestrun.testrunconfig with a text (code) editor
    3. Find your (script) folder in the file
     
      <deploymentItems type="Microsoft.VisualStudio.TestTools.Common.DeploymentItemCollection">
       <m_container type="System.Collections.Hashtable">
        <key type="Microsoft.VisualStudio.TestTools.Common.DeploymentItem">
         <path type="System.String">MyProject\DBScriptFolder\</path>
         <outputDirectory type="System.String" />
        </key>
        <value />
       </m_container>
      </deploymentItems>
     
    4. Delete the '\' (backslash) from the end of that string
    5. Save and check-in
     
    This should solve the problem of folders not being copied on the build machine. This solution is also working locally when you run the unit tests.
     
    Cheers,
    Damir
  • Thursday, June 22, 2006 2:45 PMdotnetwizkid Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Yup, that did it. Thanks so much!
  • Friday, October 20, 2006 7:54 PMMichael Koltachev - MSFT Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer

    We fixed this issue. The fix is going to be in Visual Studio SP1.

    Thank you,
    Michael Koltachev
    VSTS