FIX: You receive an MSB4018 error message when you run a .loadtest file or a .webtest file by using test containers on a Team Foundation Server 2008 Build server

Article translations Article translations
Article ID: 948816 - View products that this article applies to.
Expand all | Collapse all

On This Page

SYMPTOMS

You add the following TestContainer items to a test project on a Team Foundation Server 2008 Build server. Then, you run the project by using test containers.
<ItemGroup>
  <TestContainer Include="$(Outdir)*.Tests.dll" />
  <TestContainer Include="$(Outdir)WebTest1.webtest" />
  <TestContainer Include="$(Outdir)LoadTest1.loadtest" />
</ItemGroup>
When you do this, all unit tests in assemblies that match the *.Tests.dll pattern run successfully. However, when you run a .webtest file or a .loadtest file, you may receive an error message that resembles the following:
Using "TestToolsTask" task from assembly "C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\PrivateAssemblies\Microsoft.VisualStudio.QualityTools.MSBuildTasks.dll". Task "TestToolsTask"
warning MSB4018: The "TestToolsTask" task failed unexpectedly.
warning MSB4018: System.BadImageFormatException: Could not load file or assembly 'file:///C:BuildProjectTestService.ContinuousBinariesReleaseWebTest1.webtest' or one of its dependencies. The module was expected to contain an assembly manifest.
warning MSB4018: File name: 'file:///C:BuildProjectTestService.ContinuousBinariesReleaseWebTest1.webtest'
warning MSB4018:at System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection)
warning MSB4018: at System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection)
warning MSB4018: at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
warning MSB4018: at System.Reflection.Assembly.InternalLoadFrom(String assemblyFile, Evidence securityEvidence, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm, Boolean forIntrospection, StackCrawlMark& stackMark)
warning MSB4018: at System.Reflection.Assembly.LoadFrom(String assemblyFile)
warning MSB4018: at Microsoft.Build.Tasks.TestToolsTask.GetUTFVersionFromAssembly(String assemblyName, Int32 version)
warning MSB4018: at Microsoft.Build.Tasks.TestToolsTask.Execute()
warning MSB4018: at Microsoft.Build.BuildEngine.TaskEngine.ExecuteInstantiatedTask(EngineProxy engineProxy, ItemBucket bucket, TaskExecutionMode howToExecuteTask, ITask task, Boolean& taskResult)

CAUSE

This problem occurs if the .loadtest file or the .webtest file is an XML file. These files are used as the parameters to the Assembly.LoadFrom function. However, the Assembly.LoadFrom function expects to receive assemblies for its parameters.

RESOLUTION

Service pack information

To resolve this problem, obtain the latest service pack for Visual Studio 2008 Team Foundation. For more information, visit the following Microsoft Web site:
http://www.microsoft.com/downloads/details.aspx?FamilyId=9E40A5B6-DA41-43A2-A06D-3CEE196BFE3D&displaylang=en

Hotfix information

A supported hotfix is now available from Microsoft. However, it is intended to correct only the problem that is described in this article. Apply it only to systems that are experiencing this specific problem. This hotfix may receive additional testing. Therefore, if you are not severely affected by this problem, we recommend that you wait for the next Visual Studio 2008 Team Foundation Server service pack that contains this hotfix.

To resolve this problem immediately, contact Microsoft Customer Support Services to obtain the hotfix. For a complete list of Microsoft Customer Support Services telephone numbers and information about support costs, visit the following Microsoft Web site:
http://support.microsoft.com/contactus/?ws=support
Note In special cases, charges that are ordinarily incurred for support calls may be canceled if a Microsoft Support Professional determines that a specific update will resolve your problem. The usual support costs will apply to additional support questions and issues that do not qualify for the specific update in question.

Prerequisites

No prerequisites are required.

Restart requirement

You do not have to restart the computer after you apply this hotfix.

Hotfix replacement information

This hotfix does not replace any other hotfixes.

File information

The English version of this hotfix has the file attributes (or later file attributes) that are listed in the following table. The dates and times for these files are listed in Coordinated Universal Time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time item in Control Panel.
Collapse this tableExpand this table
File nameFile versionFile sizeDateTime
Microsoft.VisualStudio.QualityTools.MSBuildTasks.dll9.0.21022.14324,57621-Jul -20077:44:06 AM

STATUS

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

MORE INFORMATION

For more information about software update terminology, click the following article number to view the article in the Microsoft Knowledge Base:
824684 Description of the standard terminology that is used to describe Microsoft software updates

Properties

Article ID: 948816 - Last Review: October 8, 2011 - Revision: 2.0
APPLIES TO
  • Microsoft Visual Studio Team System 2008 Team Foundation Server
Keywords: 
kbexpertiseadvanced kbfix kbqfe KB948816

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com