我在TFS中构建应用程序并包括单元测试时遇到了一些麻烦。当我执行构建时,它会因一些错误而失败,所有错误都与"Exception thrown executing tests in [my directory here]. System.IO.FileNotFoundException: Could not load file or assembly 'System.Windows.Interactivity'".
现在,如果我告诉构建跳过测试,构建就会通过。我确保有问题的项目在本地成功构建了发布模式,并且在$\Common\Third Party\MVVMLight\V4\WPF 4.0\
的源代码管理中找到了System.Windows.Interactivity.dll,我将构建定义指向该位置作为活动源设置下的工作文件夹。
我的源设置的图像在下面(抱歉,我需要更多的代表在这里发布图像,显然)。 Click here for the picture. 保存构建定义并运行它,我得到了这个:
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)`
我有点(好吧,很多)迷失在这里。对IT世界来说还是一个新手,所以如果我错过了一些明显的东西,那就要温柔一点。我读到的关于将测试集成到TFS版本中的大多数文章只是“通过将”跳过测试“设置为错误来在此处进行测试。好的,你很高兴去!”,所以这已经越来越令人沮丧。