Reputation: 173
Using TFS 2010 and vs 2010:
When kicking off a build on the build machine, Unit Tests failing are with a System.IO.FileNotFoundException when trying to do a System.Reflection.Assembly.Load.
If i run these tests locally they work fine. Also, if i remote into the build machine and open the solution manually the unit tests will work fine.
The assembly that is being loaded is a project that is contained in the solution, and is referenced by the unit test project. It is used for localization, that is why we are doing an assembly.load.
Is there some temp location on the build machine that the Build Service uses that is causing this issue? is there something i need to configure so that the Assembly can be found by the Build Service?
thanks
Upvotes: 0
Views: 649
Reputation: 20330
Sorry about the misleading comment it's your unit test that's failing, not your build
In the test that's trying to do the load have you marked it up with a deployment attribute e.g.
[TestMethod]
[DeploymentItem("SomeLibrary.dll")]
public void TestSomeStuff()
{
}
I had the same issue in that my tests ran okay on my machine, but without the attribute they failed on our buold server, they weren't getting moved in to the folder where all the test thingies go.
Upvotes: 1