2

A collection of tests fail, because MTM attempts to reference assemblies loaded in the 2.0 Assembly GAC instead of the 4.0 GAC. Each of the test pass when executed using mstest.

Is there a technique for forcing MTM to reference the 4.0 Assembly GAC?

jessehouwing
  • 106,458
  • 22
  • 256
  • 341
bartonm
  • 1,600
  • 3
  • 18
  • 30
  • 1
    @jessehouwing Yes there is. See http://msdn.microsoft.com/en-us/library/yf1d93sz(v=vs.110).aspx. Starting with the .NET Framework 4, the default location for the global assembly cache is %windir%\Microsoft.NET\assembly. In earlier versions of the .NET Framework, the default location is %windir%\assembly. – MvdD Jan 06 '14 at 22:51
  • Didn't know that. One learns every day :). Which version of MTM are you using? 2010? 2012? 2013? What are the versions of the assemblies in your two different GACs? What is the lowest .NET version of your .NET test projects? (MTM and TFS will load 3.5 and 2.0 test projects using a different test executable). – jessehouwing Jan 07 '14 at 20:55
  • @jessehouwing We're on 2012. The assembly containing the tests is a .NET 4.5 assembly which previously loaded the PowerShell v1.0 assembly from the .NET 2.0 GAC. The test project was updated to reference the PowerShell 3.0 assembly, which is on the same machine in the .NET 4.0 GAC. But MTM cannot find it for some reason. Can you elaborate on the different test executables? – MvdD Jan 09 '14 at 17:49
  • In the visual studio folder you'll find multiple `QTAgent###.exe` files. These are for 32 bit/64 bit and CLR 2.0 and CRL 4.0. Depending on the Test Run Settings for your project, one of these is selected to run the tests. See also: http://social.msdn.microsoft.com/Forums/windowshardware/en-US/cd13ea5e-6380-4a2b-b2e0-4ca0bc9ae4dd/mtm-is-running-qtagent3240exe-instead-of-qtagent32exe – jessehouwing Jan 09 '14 at 18:04

0 Answers0