none
Visual Studio Plugin: Reference to type 'TeamFoundationServer' could not be found RRS feed

  • Question

  • Hello,

    I work on a Visual Studio Plugin that I want to update from vs2015 to vs2017. After updating all the nuget packages I got the error:

    CS7069 Reference to type 'TeamFoundationServer' claims it is defined in 'Microsoft.TeamFoundation.Client', but it could not be found

    The Code causing this ist:

    TfsTeamProjectCollection teamProjectCollection =/*..*/;
    DocumentService doc = Dte.GetObject("Microsoft.VisualStudio.TeamFoundation.WorkItemTracking.DocumentService") as DocumentService;
                    
    IWorkItemDocument wiDoc = doc.GetWorkItem(teamProjectCollection, id, this);

    So I dont use 'TeamFoundationServer' as it self because I use the other overload of the GetWorkItem method.

    Microsoft.TeamFoundationServer.ExtendedClient is on Version 15.112.1, so it should contain correct Version.

    I try to compile in vs2015 and 2017 getting in both cases the same error.

    Friday, December 8, 2017 9:57 AM

All replies

  • Hi Daniel,

    Have you installed the "Microsoft.TeamFoundation.Client.dll" to your project?

    And how do you add this dll to your project?

    I tested the code then I added the dll with NuGet, but the file under NuGet is a 3rd file, so try to find it under your local machine instead. It is under the following path in my PC:

    C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer 

    Regards,

    Stanly


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Edited by Stanly Fan Monday, December 11, 2017 8:22 AM
    Monday, December 11, 2017 7:44 AM
  • Hi Stanly,

    I had it from NuGet, but now I changed it to the same path as you on local pc. But the error remains.

    I thpought may be I have to change the other dlls, So I chenged also the Microsoft.TeamFoundation.WorkItem* and Microsoft.TeamFoundation.Common dlls, also no success :-(

    Best,
    Daniel

    Monday, December 11, 2017 8:40 AM
  • Hi Daniel H. Wehrle,

    This forum discusses and asks questions about extending and integrating with Visual Studio, since your issue is more related to TFS. I would suggest that you could post your issue on stackoverflow with tag tfs, tfs2017,tfs2015

    https://stackoverflow.com/

    Thanks for your understanding and cooperation.

    Best regards,

    Zhanglong Wu


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, December 12, 2017 7:42 AM