Welcome to Team System Rocks Sign in | Join | Help

Using the TFS API in your 64-bit development environment

I recently got a new laptop and I am now running 64-bit Windows Vista and today I was working on some custom code using the Team Foundation Server API. My unit tests ran great but when the time came to test the final product I started getting a weird error:

 

[System.BadImageFormatException]: {"Could not load file or assembly 'Microsoft.TeamFoundation.Client, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. An attempt was made to load a program with an incorrect format."}

 

After scratching my head a few times and making sure I had all the correct project references and that I had done everything right I started digging a little bit. I found some forum post that gave me a hint, I tried it and it worked;

 

When you use the TFS API you need to make sure you set the 'Platform target' project property to x86. You can find this property on the 'Build' tab or page of the Project Properties.

 

See also: http://msdn.microsoft.com/en-us/library/ms164699.aspx

Published Wednesday, September 10, 2008 4:19 PM by omarv

Comments

No Comments

New Comments to this post are disabled