The type or namespace name 'TeamFoundation' does not exist in the namespace 'Microsoft'

11,455

You are trying to reference a higher version dll(.net 4.5) in a lower version project (.net 4.0).

Either upgrade your project to .net 4.5 or reference the .net 4.0 version dll.

Share:
11,455
CodeNinja
Author by

CodeNinja

Updated on June 21, 2022

Comments

  • CodeNinja
    CodeNinja almost 2 years

    I added the following reference to my ASP.NET MVC 4 application using .net 4.0.

    I also included the namespace in my Application , but still I see the following error :

     Reference : Microsoft.TeamFoundation.Client.dll
    C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\ReferenceAssemblies\v2.0\Microsoft.TeamFoundation.Client.dll
    
       "The type or namespace name 'TeamFoundation' does not exist in the namespace 'Microsoft' "
    

    I have another console application and I didnt see this error while using the reference in that application . Is there something different I need to do for a Web/MVC application ? Please let me know .

    There is also this warning I see :

    Warning 1   The primary reference "Microsoft.TeamFoundation.Client, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" could not be resolved because it was built against the ".NETFramework,Version=v4.5" framework. This is a higher version than the currently targeted framework ".NETFramework,Version=v4.0". 
    
  • Kagan Agun
    Kagan Agun over 8 years
    Yes that's logical. We can not use Microsoft.TeamFoundation.Build.Client" version:12.0.0.0 , runtime version :v4.0.xxxx with .Net 4.0. See the link. The problem is that the run time version doesn't clearly indicate that.