简体   繁体   中英

Unit test in visual studio looks for a version of a dll that does not exist. QualityTools.UnitTestFrameWork 12.0.0.0

I have this wierd problem, and it only appears after when I add a second Test Class and add some code to it.

It works fine before I add the second testclass and it works fin until I add som more code to the second testclass. I cant make out what triggers this problem but the following appears:

Error loading C:\\Tfs\\Test\\AcceptanceTest\\OrganizationServiceTests\\OrganizationServiceV2Tests\\OrganizationServiceTest\\bin\\Debug\\OrganizationServiceV2Tests.dll: Could not load file or assembly 'Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.

Its a unit test.

It is looking for a 12.0.0.0 version of qualitytools.unittestframework, What I can make out of it, there is only up to version 10.0.0.0. Everywhere I look there is no reference to this version. All references refer to 10.0.0.0 So I have no idea where this comes from.

Is there anyway to further debug this or anyone know what problem this could be?

This is what the dll looks like:

// Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=10.0.0.0,        Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a

// Architecture: AnyCPU (64-bit preferred)
// Runtime: .NET 2.0

using System;
using System.Diagnostics;
using System.Reflection;
using System.Resources;
using System.Runtime.CompilerServices;
using System.Runtime.ConstrainedExecution;
using System.Runtime.InteropServices;
[assembly: AssemblyVersion("10.0.0.0")]
[assembly: CLSCompliant(true)]
[assembly:     Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: AssemblyCompany("Microsoft Corporation")]
[assembly: AssemblyCopyright("© Microsoft Corporation. All rights     reserved.")]
[assembly:     AssemblyDefaultAlias("Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll")]
[assembly: AssemblyDelaySign(true)]
[assembly:     AssemblyDescription("Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll")    ]
[assembly: AssemblyFileVersion("12.0.30723.0")]
[assembly: AssemblyInformationalVersion("12.0.30723.0")]
[assembly: AssemblyKeyFile("f:\\dd\\tools\\devdiv\\FinalPublicKey.snk")]
[assembly: AssemblyProduct("Microsoft® Visual Studio® 2013 ")]
[assembly: AssemblyTitle("Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll")]
[assembly: NeutralResourcesLanguage("en-US")]
[assembly: SatelliteContractVersion("10.0.0.0")]
[assembly: CompilationRelaxations(8)]
[assembly:     InternalsVisibleTo("Microsoft.VisualStudio.QualityTools.Tips.UnitTest.Adapter,     PublicKey=002400000480000094000000060200000024000052534131000400000100010007d1fa    57c4aed9f0a32e84aa0faefd0de9e8fd6aec8f87fb03766c834c99921eb23be79ad9d5dcc1dd9ad2    36132102900b723cf980957fc4e177108fc607774f29e8320e92ea05ece4e821c0a5efe8f1645c4c    0c93c1ab99285d622caa652c1dfad63d745d6f2de5f17e5eaf0fc4963d261c8a12436518206dc093    344d5ad293")]
[assembly: InternalsVisibleTo("MS.TLM.Test.TE.LegacyDC.TestHelpers.Common,     PublicKey=002400000480000094000000060200000024000052534131000400000100010057c60b    06ff787f4e7584af1d49e4ec20b109b1e200b97688b4ce376b11f91652ee69f3e57388a4ea13380d    37ef7921c38f0797f4ae1508884531b8847a89856207f67b0b833a950169a35b37e57b107cd985ea    0deda6177ad2213ed5751161262c28f37a4d4312db785177bfd08be4a961636f9359211c3be188f6    4ddca934a8")]
[assembly:     InternalsVisibleTo("MS.TLM.Test.TE.LegacyDC.UnitTestFrameworkTest,     PublicKey=002400000480000094000000060200000024000052534131000400000100010007d1fa    57c4aed9f0a32e84aa0faefd0de9e8fd6aec8f87fb03766c834c99921eb23be79ad9d5dcc1dd9ad2    36132102900b723cf980957fc4e177108fc607774f29e8320e92ea05ece4e821c0a5efe8f1645c4c    0c93c1ab99285d622caa652c1dfad63d745d6f2de5f17e5eaf0fc4963d261c8a12436518206dc093    344d5ad293")]
[assembly:     InternalsVisibleTo("Microsoft.VisualStudio.TestTools.TestGeneration,     PublicKey=002400000480000094000000060200000024000052534131000400000100010007d1fa    57c4aed9f0a32e84aa0faefd0de9e8fd6aec8f87fb03766c834c99921eb23be79ad9d5dcc1dd9ad2    36132102900b723cf980957fc4e177108fc607774f29e8320e92ea05ece4e821c0a5efe8f1645c4c    0c93c1ab99285d622caa652c1dfad63d745d6f2de5f17e5eaf0fc4963d261c8a12436518206dc093    344d5ad293")]
[assembly:     InternalsVisibleTo("Microsoft.VisualStudio.TestPlatform.Extensions.VSTestIntegra    tion,     PublicKey=002400000480000094000000060200000024000052534131000400000100010007d1fa    57c4aed9f0a32e84aa0faefd0de9e8fd6aec8f87fb03766c834c99921eb23be79ad9d5dcc1dd9ad2    36132102900b723cf980957fc4e177108fc607774f29e8320e92ea05ece4e821c0a5efe8f1645c4c    0c93c1ab99285d622caa652c1dfad63d745d6f2de5f17e5eaf0fc4963d261c8a12436518206dc093    344d5ad293")]
[assembly:     InternalsVisibleTo("Microsoft.VisualStudio.TestTools.TestGenerationDialog,     PublicKey=002400000480000094000000060200000024000052534131000400000100010007d1fa    57c4aed9f0a32e84aa0faefd0de9e8fd6aec8f87fb03766c834c99921eb23be79ad9d5dcc1dd9ad2    36132102900b723cf980957fc4e177108fc607774f29e8320e92ea05ece4e821c0a5efe8f1645c4c    0c93c1ab99285d622caa652c1dfad63d745d6f2de5f17e5eaf0fc4963d261c8a12436518206dc093    344d5ad293")]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: ReliabilityContract(Consistency.MayCorruptInstance, Cer.None)]
[assembly: ComVisible(false)]

Really have no idea where it sets the version to 12.0.0.0,

Kind regards

Fredrik

The problem occurs if you use: Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll version 10.1.0.0 together with Microsoft.VisualStudio.QualityTools.LoadTestFrameWork.dll. It will then try to find a dll that doesn´t exist.

The solution is to remove UnitTestFramework.dll and replace it with version 10.0.0.0.

Then it will work. Seems strange not to be able to use the latest...

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM