title: ERROR CS0234 namespace name 'Encodings' does not exist
body: <p>I am following the <a href="https://docs.microsoft.com/en-us/aspnet/core/tutorials/first-mvc-app/adding-controller" rel="nofollow noreferrer">Microsoft Tutorial</a> on Adding Controllers and came across the following errors:</p>
  
  <p>1) CS0234   The type or namespace name 'Encodings' does not exist in the namespace 'System.Text' (are you missing an assembly reference?).</p>
  
  <p>2) CS0103   The name 'HtmlEncoder' does not exist in the current context    WebMVC2</p>
  
  <p>Below is the code I currently have:</p>
  
  <pre><code>using System.Web.Mvc;
  using System.Text.Encodings.Web;
  
  namespace WebMVC2.Controllers
  {
      public class HelloWorldController : Controller
      { 
          // GET: /HelloWorld/
          public string Index()
          {
              return "This is my default action...";
          }
  
          // GET: /HelloWorld/Welcome/ 
          public string Welcome(string name, int numTimes = 1)
          {
              return HtmlEncoder.Default.Encode($"Hello {name}, NumTimes is: {numTimes}");
          }
  </code></pre>
  
  <p>I am currently using Visual Studio 2017 and have the .NET Core SDK 2.1.3</p>
  
  <p>Can anyone help me fix this problem?</p>