locked
Could not load file or assembly 'Microsoft.TeamFoundation.WorkItemTracking.Controls RRS feed

  • Question

  • I tried to use the sample code in the SDK (Februrary 2007) WIbrownser (located in directory C:\Program Files\Visual Studio 2005 SDK\2007.02\VisualStudioTeamSystemIntegration\Work Item Tracking\WorkItemInterfaceSample)

    When I run the sample I end up with the following error as soon as I try to connect to my server:

    WIBrowser.vshost.exe' (Managed): Loaded 'C:\Program Files\Visual Studio 2005 SDK\2007.02\VisualStudioTeamSystemIntegration\Work Item Tracking\WorkItemInterfaceSample\bin\Debug\WIBrowser.exe', Symbols loaded.

    A first chance exception of type 'System.IO.FileLoadException' occurred in mscorlib.dll

    Additional information: Could not load file or assembly 'Microsoft.TeamFoundation.WorkItemTracking.Controls, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. Strong name validation failed. (Exception from HRESULT: 0x8013141A)

    The assembly cannot be found in the GAC.  I tried to install it manually with GACUTIL without any success.

    I un-install and re-install the SDK without any success. 

    What is the problem?

     

    Thanks in advance

    Wednesday, March 21, 2007 6:14 PM

Answers

All replies

  • Hi Stephane,

    Looks like you are missing other Work Item Tracking Object Model assemblies. Please install Team Foundation Client (TFC) on your machine and try again.

    Thanks,

    Sunder

    Wednesday, March 21, 2007 11:16 PM
    Moderator
  • TFC client is already installed on my machine (I'm currently using TFS).  Also the missing assembly can be found in

    C:\Program Files\Visual Studio 2005 SDK\2007.02\VisualStudioIntegration\Common\Assemblies\Microsoft.TeamFoundation.WorkItemTracking.Controls.dll

     

    However, when I look at the GAC, this DLL alone is missing.  All the other one (Microsoft.TeamFoundation.Client, Microsoft.TeamFoundation.Common, Microsoft.TeamFoundation.WorkItemTracking.Client ) are installed.  When I tried to install it manually (with GACUtil), it failled with the same error message as above.

     

    Thanks

     

    Stephane

    Wednesday, March 28, 2007 11:03 AM
  • Hi Stephane,

     

    I didn't get your problem right the first time - sorry about that. Since you have TFC installed, when the sample loads up, all the referenced assemblies are loaded from the GAC, but since the Controls.dll is not in the GAC an attempt is made to load the the assembly from the bin\debug folder. But the assembly in the common\assemblies folder that is copied locally is not signed, so the assembly load fails.

     

    To get your sample to run, please open up the solution and remove the reference to Microsoft.TeamFoundation.WorkItemTracking.Controls.dll and add the reference from C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\PrivateAssemblies\Microsoft.TeamFoundation.WorkItemTracking.Controls.dll. Then build the solution and run the sample.

     

    Hope this helps,

    Sunder

    Wednesday, March 28, 2007 10:31 PM
    Moderator
  • This didn't work for me. I tried referencing one (then all) of the Microsoft.TeamFoundation assemblies needed by WIBrowser from PrivateAssemblies but got a System.BadImageFormatException.
    Thursday, April 5, 2007 4:20 PM
  • Hi Ron,

     

    What build of TFC are you running? RTM? Or a recent CTP? The error you are getting is a different problem. Did you start off in a state where you were getting the assembly load error as Stephane? When you replaced the reference for just the Controls.dll were you getting the same exception?

     

    Thanks,

    Sunder

    Thursday, April 5, 2007 9:29 PM
    Moderator
  • I tried that earlier without any success.  I think the problem come from the fact that, even if I reference the libraries somewhere on the disk, the one loaded during runtime comes from the GAC.  I think the other library tried to reference the controls library.  However since they are loaded from the GAC, (and GAC library can only reference library in the GAC), the system failed to find controls.dll in it.

     

    I may be wrong, this look like that.  I think that if we remove the TeamFoundation library from the GAC, the system will run fine.

     

    Stephane

    Friday, April 6, 2007 12:28 PM
  • Hi Sunder,

     

    You're right, I guess mine is a different problem.

     

    I'm running Visual Studio 2005 Team Explorer 77718-007-4000003-41113 with SP1 applied. I installed Visual Studio 2005 SDK Version 4.0 which is where I got the WIBrowser sample.

     

    I have two copies of the Micosoft.TeamFoundation assemblies on my system (excluding those in the GAC):

     

    The first is in Program Files (x86)\Visual Studio 2005 SDK\2007.02\VisualStudioIntegration\Common\Assemblies. This is where WIBrowser.csproj refrences the assemblies. When WIBrowser runs it fails with:

     

    +  InnerException {"Could not load file or assembly 'Microsoft.TeamFoundation.WorkItemTracking.Client, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. Strong name validation failed. (Exception from HRESULT: 0x8013141A)":"Microsoft.TeamFoundation.WorkItemTracking.Client, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"} System.Exception {System.IO.FileLoadException}

     

    The second is in Program Files (x86)\Microsoft Visual Studio 8\Common7\IDE\PrivateAssemblies. If I change WIBrowser to reference the TeamFoundation dlls there, WIBrowser fails with:

     

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

    Regards,

     

    Ron

     

    Friday, April 6, 2007 2:09 PM
  • Hi,

    I have a similar problem as Ron with almots exactly the same error messages, the small difference is that the dll that I can't load is Microsoft.TeamFoundation.WorkItemTraking.Client. I also tried to start with a blank project and I have the same result. I also tried to reference the dll in different ways from the SDK folder, from the visual studio folder, from the GAC, without any success.

    I'm using Visual Studio Team suite 2005 SP1 and the version 4.0 of the Visual Studio SDK.

    Something interesting to know is that both Ron and Me are using x64 bits OS (In my case Windows XP 64bits). I wonder if it could be related to that...
    Friday, April 27, 2007 10:07 AM
  • I follow up on my own post:
    you have to change the platform target of the project from "Any CPU" to "x86" and the problem disappears. I guess the Team Foundation dlls are not working in a x64 environment.
    Friday, April 27, 2007 10:21 AM
  • I have the same problem.

    And the problem can be reproduced with the sample from the SDK:

    C:\Program Files\Visual Studio 2005 SDK\2007.02\VisualStudioTeamSystemIntegration\Work Item Tracking\WorkItemInterfaceSample

    debug the project with command argument "explorer" and you will see the exact same error.....

    It looks like a bug..... or what? ;-)


     

    Monday, July 16, 2007 7:15 AM
  • I've got the sae error:

    Could not load file or assembly 'Microsoft.TeamFoundation.WorkItemTracking.Controls, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. Strong name validation failed. (Exception from HRESULT: 0x8013141A)

     

    But mine shows in our custom template where one of our custom controls should be showing.

     

    I'm running on Vista, as the admin and running Orcas Beta1. Tried this also on another Vista box with VS 2005 and get a similar error although there is looking for our custom control and not squawking about the MSFT control.

     

    Anyone been able to fix this?

    Monday, July 30, 2007 3:06 PM
  •  

    on Windows XP 64 bit I found that replacing all Team foundation assembly references with their assemblies in Program Files (x86)\Microsoft Visual Studio 8\Common7\IDE\PrivateAssemblies fixed the problem.
    Friday, September 28, 2007 1:05 AM
  • You need to be compiling as x86 for these assemblies to work.
    Patw
    Wednesday, February 18, 2009 11:12 PM
  • Tuesday, June 1, 2010 5:46 PM
  • I can confirm this did fix my issue!
    Tuesday, June 1, 2010 6:12 PM
  • This did fix my issue!
    Tuesday, June 1, 2010 6:12 PM
  • Changing the target platform eventually changed my issue. (I changed it to .NET 3.5, no Client Profile)
    Tuesday, June 8, 2010 8:31 AM
  • This didn't fix mine.  Installed VS2008 Team Explorer and VS2008 SP1 on the TFS server, and we're still getting the error. 

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

     


    Shawn Levendusky
    Thursday, June 24, 2010 1:12 PM
  • Finally got this fixed.  Here are all of the steps I completed.  The very last one seemed to do the trick.

    1. installed Windows Server 2003 critical updates
    2. reinstalled VS2008 SP1 on server
    3. installed Windows Server 2003 high priority updates
    4. reinstalled VS2008 SP1 on server
    5. ran Team System Web Access in 'repair' mode

    Again, the last step worked.  I think a combination of these steps should resolve the problem if anyone else finds it.


    Shawn Levendusky
    Tuesday, June 29, 2010 7:02 PM
  • Simple solution to resolve this issue is change debug mode to x86, its help me )
    Saturday, August 7, 2010 8:25 PM