How to resolve this?, are you missing assembly reference - tfs

The namespace client does not exist in Microsoft.teamfoundation are you missing assembly reference
I have added Nuget packages Microsoft.TeamFoundationServer.Client and Microsoft.TeamFoundationServer.ExtendedClient but I'm still facing this issue. I want to extract work item details from the TFS.

Microsoft.TeamFoundationServer.Client provides access to version control, work item tracking, build, and more via public REST APIs.
Microsoft.TeamFoundationServer.ExtendedClient works with and manages version control, work items, and build, and other resources from your client application. This package does not support Net Standard Client OM. This package should only be used in instances where our REST APIs don't offer the functionality you need (i.e. creating workspaces in TFVC).
If you use a TFS version >= TFS 2015, you should try to use the REST API to extract work item details. Regarding REST API version, you can refer to the following link:
https://learn.microsoft.com/en-us/azure/devops/integrate/concepts/rest-api-versioning?view=azure-devops
Here is an existing sample code on the following link, you can refer to it:
https://github.com/microsoft/azure-devops-dotnet-samples/blob/master/ClientLibrary/Samples/WorkItemTracking/WorkItemsSample.cs

Related

Azure DevOps API - Retrieve global lists

We are currently using an on premise TFS 2018 installation and there are a couple of custom applications that use the Microsoft.TeamFoundationServer.ExtendedClient in order to communicate with TFS. Now since some assemblies in the extended client are going to be deprecated (link) and a move to Azure DevOps services is a possibility I have started checking the replacement (link)
In our current implementation we are using global lists and extendedClient WorkItemStore had the ExportGlobalLists/ImportGlobalLists methods that were handy
The problem is that I cannot find an equivalent method in the new client
is witadmin the only option?
I have found this in the REST API (link) but it doesn't seem to work for on-premise so I could test it out
Any ideas would be welcome
As far as I know, there is no concept of a global list any more in Azure DevOps Services. If you want to customize the fields, it is usually defining the available list on the field.
We are utilizing the lists on-premise Azure DevOps Server 2019, but only ever interact to get them from witadmin.
According the comment in this case:
https://developercommunity.visualstudio.com/content/problem/312980/cannot-edit-existing-global-lists.html?childToView=338672#comment-338672
Global lists are now part of a specific work item. To edit the list
you should 1) export the process 2) look into the xml for the work
items. Global lists are usually added to the bug or task wit 3) make
the global list changes in the xml 4) zip up the process and import
back into Azure DevOps.

Is there way we could determine the usage of TFS Extensions in our organisation?

We are using TFS 2018 (2018.1 to be precise). I need to find out how many projects are using a particular TFS Extension. How can I get this information? Few of these extensions are installed through Visual Studio Market Place and few are developed internally.
Actually, when you install a extension, you need to specify a collection, the extension will be installed for all team projects under this collection.
In other words, extensions are installed into the collection level, it's not able to use extension for a specific project. All projects in the collection are installed.
You could take a look at our official link here: Install extensions for on-premises servers
For now, only with for a paid extension, you can restrict who can access it by Assigning paid extension access to users.
Update
However, to find out the number of builds or projects using a particular TFS extension is not available at present. There's no such build-in feature.
You could submit a feature request in Azure DevOps Develop Community site.
Our PM will kindly review your suggestion.

Ceate repository for android on tfs

I want to upload android source code on TFS using visual studio and my server side is written using C#
how to create repository for android on TFS
UPDATE1:
Please read Get Started documents first:
Get Started with Git and Team Services
Get Started with TFVC
UPDATE2:
If you just want to isolate the documents from the source code, you can create a new folder under the project, or create a new branch to store the documents, of cause you can create another repository, it's based on your requirements. Please see this article for details.
Do you have any special requirements? If not, nothing different with other projects. Assuming you are using TFVC, just try following below steps:
Connect from Visual Studio or Team Explorer
Create a team project
Add repositories
Configure your workspace and check in the source files/changes.
You can create the repository individually for client and server projects as needed.
If you just want to upload the existing source code to TFS, you just need to Put an existing solution under version control
Please see the overview documents for more information.
If you are using Android Studio, you can install the Team Services Plugin for Android Studio with Git repositories used. See here fro more info.

get data from TFS in custom web application

I need to extract some data from TFS (Team Foundation Server) and create some excel sheet with data. To automate it, I am writing an application . But problem is:
How can I get data from TFS? Is there any webservice available for this or I need to parse HTML and then get the data.
No. TFS has broad coverage APIs and came in two flavors: Object Model and REST.
The Object Model is automatically installed when you install Visual Studio / Team Explorer, otherwise you can use the stand-alone MSI. This is a .NET API, but you can also find the Java version in case you need it.
The OM is simple to use for a .Net developer.
The REST API are kind of new and you should study if they satisfy your requirement. Some APIs are supported only on VSO and they miss from TFS on-premise and older versions.

Distributing Licensed Metro XAML Control Suites via NuGet

I am currently involved in building an extensive custom control suite in XAML/C++ which which will be a 'paid-for' package, which will be available to Metro XAML developers for a licence fee.
I want to allow customers to purchase a licence via our company website, then access their purchase via Nuget within Visual Studio.
My questions are:
1) Can I utilise the NuGet packaging technology for 'paid' components (users will need to enter credentials or licence key to get them from our private Nuget repository - or something similar)
2) We would want to host our own Nuget repository to control access, and hope to hook into our TFS system - does anyone know if this is possible ?
The scenario we are trying to create is where a potential customer comes to our website, buys our control suite, downloads our controls (securely) in Visual Studio via Nuget and gets automatic updates. On the flip side, we do all of our development to TFS, press a 'deploy' button and the update gets automatically published to our TFS-based Nuget repository.
I know this is a complex multi-faceted question, but any suggestions would be welcome :)
First of all, NuGet is not supposed to contain any built-in security mechanisms - it is simple zip archive in OPC format. Once your client took a package he can send it to anyone. You can sell a service - freshest releases, bug-fix support and so on.
What about practice. You can implement NuGet API And Share to your customers only feed.
Do Any authentication you want.
Create as much feeds as you need (according to your licensing policy).
Every feed will contain only subset of your packages
Create a package on-the-fly with built-in customer key (it goes against moral rules of the project) - cause package doesn't have a signature.
But this gives you ability to enable to customer to use NuGet as a platform to update your packages along with any shared packages.
AFAIK, there is no public gallery for NuGet (Nuget Gallery, Nuget.Server, and so on) wich will restrict access to the packages.

Resources