MSTest在错误的位置寻找DLL

时间:2015-10-09 19:21:38

标签: c# .net serialization dll mstest

我有一个测试工具正在运行,由于Type not resolved而无法运行,更具体地说是一个错误绑定的SerializationException。

我使用fuslogvw来追踪它在寻找DLL的位置而没有找到它,我很困惑它为什么要查看它所在的位置:

=== Pre-bind state information ===
LOG: DisplayName = DavisVision.Common.Data, Version=3.1.0.34, Culture=neutral, PublicKeyToken=c410b32babd148a6
 (Fully-specified)
LOG: Appbase = file:///C:/PROGRAM FILES (X86)/MICROSOFT VISUAL STUDIO 14.0/COMMON7/IDE/COMMONEXTENSIONS/MICROSOFT/TESTWINDOW/
LOG: Initial PrivatePath = NULL
LOG: Dynamic Base = NULL
LOG: Cache Base = NULL
LOG: AppName = vstest.executionengine.exe
Calling assembly : (Unknown).
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO 14.0\COMMON7\IDE\COMMONEXTENSIONS\MICROSOFT\TESTWINDOW\vstest.executionengine.exe.Config
LOG: Using host configuration file: 
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\v4.0.30319\config\machine.config.
LOG: Post-policy reference: DavisVision.Common.Data, Version=3.1.0.34, Culture=neutral, PublicKeyToken=c410b32babd148a6
LOG: GAC Lookup was unsuccessful.
LOG: Attempting download of new URL file:///C:/PROGRAM FILES (X86)/MICROSOFT VISUAL STUDIO 14.0/COMMON7/IDE/COMMONEXTENSIONS/MICROSOFT/TESTWINDOW/DavisVision.Common.Data.DLL.
LOG: Attempting download of new URL file:///C:/PROGRAM FILES (X86)/MICROSOFT VISUAL STUDIO 14.0/COMMON7/IDE/COMMONEXTENSIONS/MICROSOFT/TESTWINDOW/DavisVision.Common.Data/DavisVision.Common.Data.DLL.
LOG: Attempting download of new URL file:///C:/PROGRAM FILES (X86)/MICROSOFT VISUAL STUDIO 14.0/COMMON7/IDE/COMMONEXTENSIONS/MICROSOFT/TESTWINDOW/Extensions/DavisVision.Common.Data.DLL.
LOG: Attempting download of new URL file:///C:/PROGRAM FILES (X86)/MICROSOFT VISUAL STUDIO 14.0/COMMON7/IDE/COMMONEXTENSIONS/MICROSOFT/TESTWINDOW/Extensions/DavisVision.Common.Data/DavisVision.Common.Data.DLL.
LOG: Attempting download of new URL file:///C:/PROGRAM FILES (X86)/MICROSOFT VISUAL STUDIO 14.0/COMMON7/IDE/COMMONEXTENSIONS/MICROSOFT/TESTWINDOW/DavisVision.Common.Data.EXE.
LOG: Attempting download of new URL file:///C:/PROGRAM FILES (X86)/MICROSOFT VISUAL STUDIO 14.0/COMMON7/IDE/COMMONEXTENSIONS/MICROSOFT/TESTWINDOW/DavisVision.Common.Data/DavisVision.Common.Data.EXE.
LOG: Attempting download of new URL file:///C:/PROGRAM FILES (X86)/MICROSOFT VISUAL STUDIO 14.0/COMMON7/IDE/COMMONEXTENSIONS/MICROSOFT/TESTWINDOW/Extensions/DavisVision.Common.Data.EXE.
LOG: Attempting download of new URL file:///C:/PROGRAM FILES (X86)/MICROSOFT VISUAL STUDIO 14.0/COMMON7/IDE/COMMONEXTENSIONS/MICROSOFT/TESTWINDOW/Extensions/DavisVision.Common.Data/DavisVision.Common.Data.EXE.
LOG: All probing URLs attempted and failed.

如果我将DLL放在该文件夹中,它显然可以正常加载,但是不应该从测试项目的bin目录加载,如何让MSTest从bin文件夹中加载正确的DLL? / p>

这只发生在这个测试工具中,所有项目都能正常绑定到这个DLL而没有问题。

注意: - 不确定这是否会影响任何内容,但这是一个内部NuGet包,它在测试工具中被引用,但是DLL被拉入并放入测试工具中。 bin /文件夹。

0 个答案:

没有答案