On my 64bit Vista machine, I'm trying to build a little application which makes use of a set of DLLs from the Team Foundation Server Client. The application builds fine. However, when I attempt to run the application in debug, I get the following error:
=== Pre-bind state information ===
LOG: User =
LOG: DisplayName = Microsoft.TeamFoundation.Client, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
(Fully-specified)
LOG: Appbase = file:///C:/Development/TFSImport/bin/Debug/
LOG: Initial PrivatePath = NULL
Calling assembly : TFSImport, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null.
===
LOG: This bind starts in default load context.
LOG: No application configuration file found.
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\v2.0.50727\config\machine.config.
LOG: Post-policy reference: Microsoft.TeamFoundation.Client, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
LOG: Attempting download of new URL file:///C:/Development/TFSImport/bin/Debug/Microsoft.TeamFoundation.Client.DLL.
ERR: Failed to complete setup of assembly (hr = 0x8007000b). Probing terminated.
After a bit of head scratching I realised that the TFS Client DLLs are 32-Bit and the application was being built for a 64-Bit platform. To fix this problem I had to get the build targeting a 32bit platform. To do this, I opened up the Configuration Manager in Visual Studio:
From the Active Solution Platform, I chose the drop down menu item "<New...>".
A dialog appeared called "New Solution Platform".
In this dialog, I selected the item "x86" from the drop down list "Type or select the new platform:", then clicked OK.
You'll notice that the Configuration Manager has been updated with the new Platform details for the project.
I now click the "Close" button.
Now I'm able to build and run my application in debug.
a5e7de8a-f07d-48ce-bb19-24f15da894e4|2|5.0