locked
VS2008: .TestRunConfig the nonexistant RelativePathRoot RRS feed

  • Question

  • I'm unit testing using VS2008 Beta with the .NET 3.5 framework.  I'd like to use the DeploymentItem attribute on my test method, but I'm having a problem figuring out what the relative path root directory is.  All documentation on MSDN says that there is a property called RelativePathRoot in the .testrunconfig file.  When I open this file in the xml editor, no such property exists.  Can anyone tell me how you know what the relative root path is?

    Thanks for your response,
    Dan
    Wednesday, November 28, 2007 8:54 PM

Answers

  • I've found the answer to this question, it is simply the directory of the solution containing your test project.
    Wednesday, November 28, 2007 10:36 PM

All replies

  • I've found the answer to this question, it is simply the directory of the solution containing your test project.
    Wednesday, November 28, 2007 10:36 PM
  • I've got a solution and a test project in quite different places, and while trying to get DeploymentItem working, I think I've found another clue to where RelativePathRoot really is:

    http://msdn.microsoft.com/en-us/library/microsoft.visualstudio.testtools.unittesting.deploymentitemattribute.aspx says "Relative paths are relative to the RelativePathRoot setting"

    The files only get picked up for deployment if the path is measured relative to the bin\debug directory of the test project (before deployment), so I guess that's where the RelativePathRoot variable must point to.

    I hope this helps someone.
    Monday, November 3, 2008 6:21 PM