Please refer to the Introduction to PnP Core Component and OfficeDevPnP.Core for more details. I have created a console application and added SharePointPnPCore2016 NuGet package for the SharePoint 2016 version.
Code Snippet
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using Microsoft.SharePoint.Client;
  7. using OfficeDevPnP.Core;
  8. using OfficeDevPnP.Core.Extensions;
  9. using Microsoft.SharePoint.Client.Taxonomy;
  10. namespace SP2016PnPCoreComponentDemo
  11. {
  12. class Program
  13. {
  14. static void Main(string[] args)
  15. {
  16. // Input Parameters
  17. string siteUrl = "http://c7395723754/";
  18. string userName = "administrator";
  19. string password = "Mf165Nz2WV";
  20. string domain = "AD2012";
  21. Guid termSetID = new Guid("e6b07ab0-99d2-42b7-b2c7-ab6cdadf216d");
  22. string termName = "PnP Create Group";
  23. OfficeDevPnP.Core.AuthenticationManager authMgr = new OfficeDevPnP.Core.AuthenticationManager();
  24. try
  25. {
  26. // Get the client context
  27. using (var ctx = authMgr.GetNetworkCredentialAuthenticatedContext(siteUrl, userName, password, domain))
  28. {
  29. // Get a Taxonomy Term by Name
  30. Term term = ctx.Site.GetTermByName(termSetID, termName);
  31. Console.WriteLine(term.Description);
  32. Console.ReadLine();
  33. }
  34. }
  35. catch (Exception ex)
  36. {
  37. Console.WriteLine("Error Message: " + ex.Message);
  38. }
  39. }
  40. }
  41. }