>From what I can see the TestToolsTask sets the current directory to the SearchPathRoot parameter that is passed in by Team Build. This parameter defaults to the property $(OutDir). If you wanted to check the value of this property you could override the BeforeTestConfiguration target and output the $(OutDir) variable to the log.
On Wed, Jun 18, 2008 at 3:03 PM, Damian Edwards <[EMAIL PROTECTED]> wrote: > In the TFS2005 environment we're using the msbuild community task that > allows container assemblies, in the TFS2008 environment we're using the > in-built container assembly support. > > Regards, > > *Damian Edwards > *Readify | Senior Consultant > > M: 0448 545 868 | E: [EMAIL PROTECTED] | C: > [EMAIL PROTECTED] | W: www.readify.net > > > > *From:* [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] *On Behalf Of > *William Bartholomew > *Sent:* Wednesday, 18 June 2008 14:53 > *To:* [email protected] > *Subject:* Re: [OzTFS] TFS2008 team build unit test issue with deployment > items > > > > How are the tests being executed from Team Build? Using tests lists, test > containers, or executing mstest.exe directly? Assembly.Load and relative > file reads (which it looks like WSE is doing) will use the current working > directory which appears to be the location of devenv.exe rather than the > unit test's directory. > > > > William > > On Wed, Jun 18, 2008 at 2:27 PM, Damian Edwards < > [EMAIL PROTECTED]> wrote: > > Heya, > > > > We're having trouble migrating some unit tests from the existing TFS2005 > build environment to the new TFS2008 environment. The tests in question all > rely on reading a file from disk which is deployed using the > DeploymentItemAttribute, e.g. wse3policycache.config. The errors raised are > like this: > > > > Test method Centricom.POLi.TestAssembly0.DummyTests.DansDummyTest threw > exception: System.FormatException: Failed parsing the policy document. > ---> System.IO.FileNotFoundException: Could not find file 'C:\Program > Files\Microsoft Visual Studio 9.0\Common7\IDE\wse3policyCache.config'.. > > > > So as you can see it is trying to read that file from the wrong folder, in > this case it looks like the folder that the test host is run from. The file > in question is actually deployed to the test result out folder as expected: > > > > *Error! Filename not specified.* > > > > Other tests use the DeploymentItemAttribute to deploy Excel files for > data-driven tests and they are working fine, indicating the issue seems to > be isolated to when either WSE is looking for the policy cache file, or when > using Assembly.Load() to load a file from the active folder (as some other > tests that are failing are doing). > > > > This all works fine on the current TFS2005 build server and when run > locally in VS2008. > > > > Ideas? > > Regards, > > *Damian Edwards > *Readify | Senior Consultant > > Suite 206 Nolan Tower | 29 Rakaia Way | Docklands | VIC 3008 | Australia > > M: 0448 545 868 | E: [EMAIL PROTECTED] | C: > [EMAIL PROTECTED] | W: www.readify.net > ------------------------------ > > The content of this e-mail, including any attachments is a confidential > communication between Readify Pty Ltd and the intended addressee and is for > the sole use of that intended addressee. If you are not the intended > addressee, any use, interference with, disclosure or copying of this > material is unauthorized and prohibited. If you have received this e-mail in > error please contact the sender immediately and then delete the message and > any attachment(s). > > > > OzTFS.com - to unsubscribe from this list, send a message back to the list > with 'unsubscribe' as the subject. View the web archives at > http://www.mail-archive.com/[email protected]/ > Powered by mailenable.com, supported by www.readify.net > > > OzTFS.com - to unsubscribe from this list, send a message back to the list > with 'unsubscribe' as the subject. View the web archives at > http://www.mail-archive.com/[email protected]/ > Powered by mailenable.com, supported by www.readify.net > OzTFS.com - to unsubscribe from this list, send a message back to the > list with 'unsubscribe' as the subject. View the web archives at > http://www.mail-archive.com/[email protected]/ > Powered by mailenable.com, supported by www.readify.net > OzTFS.com - to unsubscribe from this list, send a message back to the list with 'unsubscribe' as the subject. View the web archives at http://www.mail-archive.com/[email protected]/ Powered by mailenable.com, supported by www.readify.net
