Welcome to Manicprogrammer Sign in | Join | Help

Here’s The Deal When Your Code Compiles But At Runtime It Can’t Find Some TFS Assemblies

I have run into this twice now. Both on the same project but different branches. The second time was about 6 weeks after the first and I could not remember where or when I had seen it first I just knew that I had. The steps go like this:

The solution compiles clean.

You go to run the solution and it may start running if it doesn’t have an immediate reliance on a TFS assembly. As soon as the application needs to load a TeamFoundation assembly it dies with the following exception:

"Could not load file or assembly 'Microsoft.TeamFoundation, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.":"Microsoft.TeamFoundation, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"

As it turns out I am working on an x64 machine and the Solution Platform was set to Any CPU or Mixed Platforms

image

 

 

 

 

 

I needed to open up the Solution Configuration and create an x86 platform configuration and then set each project to the x86 Platform (both debug and release). Then when I compile I ensure I have the x86 selected as the Solution Platform.

Voila! The code now runs on my x64 machine.

 

 

Technorati Tags:
Published Sunday, April 26, 2009 2:51 PM by michaelruminer
Filed under

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

Thursday, April 30, 2009 9:30 AM by Team System News

# VSTS Links - 04/30/2009

Michael Ruminer on Here's The Deal When Your Code Compiles But At Runtime It Can't Find Some

Thursday, June 25, 2009 4:28 PM by Gavin Stevens

# re: Here’s The Deal When Your Code Compiles But At Runtime It Can’t Find Some TFS Assemblies

Thanks man, you rock...  what a pain that was..


Enter the text you see in the image:

Leave a Comment

(required) 
required 
(required)