0

I am having a bit of trouble building my application in TFS and including our unit tests. When I execute the build, it fails with a number of errors, all seemingly related to "Exception thrown executing tests in [my directory here]. System.IO.FileNotFoundException: Could not load file or assembly 'System.Windows.Interactivity'".

Now, the build passes if I tell the build to skip tests. I have made sure that the project in question successfully builds in release mode locally, and the System.Windows.Interactivity.dll is found in source control at $\Common\Third Party\MVVMLight\V4\WPF 4.0\, and I am pointing the build definition to that location as an active working folder under Source Settings.

An image of my Source Settings is below (sorry, I need more rep to post an image here, apparently). Click here for the picture. Save the build definition and run it, and I'm given this:

 Exception thrown executing tests in C:\Builds\1\SqlProducts\Workbench QA 4878    \Binaries\ObfuscatedAssemblies\PragmaticWorks.SsisUnitTests.UI.dll`
 System.IO.FileNotFoundException: Could not load file or assembly 'System.Windows.Interactivity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
 File name: 'System.Windows.Interactivity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'`

Server stack trace: 
   at System.Reflection.RuntimeAssembly.GetExportedTypes(RuntimeAssembly assembly, ObjectHandleOnStack retTypes)
   at System.Reflection.RuntimeAssembly.GetExportedTypes()
   at NUnit.Core.CoreExtensions.InstallAdhocExtensions(Assembly assembly)
   at NUnit.Core.Builders.TestAssemblyBuilder.Load(String path)
   at NUnit.Core.Builders.TestAssemblyBuilder.Build(String assemblyName, Boolean autoSuites)
   at NUnit.Core.Builders.TestAssemblyBuilder.Build(String assemblyName, String testName, Boolean autoSuites)
   at NUnit.Core.TestSuiteBuilder.BuildSingleAssembly(TestPackage package)
   at NUnit.Core.TestSuiteBuilder.Build(TestPackage package)
   at NUnit.Core.SimpleTestRunner.Load(TestPackage package)
   at NUnit.Core.ProxyTestRunner.Load(TestPackage package)
   at NUnit.Core.ProxyTestRunner.Load(TestPackage package)
   at NUnit.Core.RemoteTestRunner.Load(TestPackage package)
   at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Object[]& outArgs)
   at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg)`

I'm a little (OK, a lot) lost here. Still pretty new to the IT world, so if I'm missing something obvious, be gentle. Most articles I've read about integrating your tests into TFS builds are just "Turn your tests on here by setting "Skip Tests" to false. OK, you're good to go!", so this has been increasingly frustrating.

4

0 回答 0