title: Link tag helper not working in asp.net core 2.2
body: <p>My link tag helpers are no longer working properly after migrating to asp.net core 2.2.</p>
  
  <pre><code> &lt;a class="btn btn-outline-primary" asp-controller="MyController" asp-action="MyAction" asp-route-id="@Id"&gt;Link&lt;/a&gt;
  </code></pre>
  
  <p>This works fine when I set the compatibility version to 2.1, but produces an empty href when set to compatibility version 2.2.</p>
  
  <pre><code>&lt;a class="btn btn-outline-primary" href=""&gt;Link&lt;/a&gt;
  </code></pre>
  
  <p>I followed the steps <a href="https://docs.microsoft.com/en-us/aspnet/core/migration/21-to-22?view=aspnetcore-2.2&amp;tabs=visual-studio" rel="nofollow noreferrer">Migrate from ASP.NET Core 2.1 to 2.2</a></p>
  
  <pre><code> .SetCompatibilityVersion(CompatibilityVersion.Version_2_1);  --&gt; Works
  
   .SetCompatibilityVersion(CompatibilityVersion.Version_2_2);  --&gt; Doesn't work
  </code></pre>
  
  <p>Project file:</p>
  
  <pre><code>&lt;Project Sdk="Microsoft.NET.Sdk.Web"&gt;
  
    &lt;PropertyGroup&gt;
      &lt;TargetFramework&gt;netcoreapp2.2&lt;/TargetFramework&gt;
      &lt;TypeScriptToolsVersion&gt;2.8&lt;/TypeScriptToolsVersion&gt;
      &lt;LangVersion&gt;7.2&lt;/LangVersion&gt;
      &lt;AspNetCoreHostingModel&gt;InProcess&lt;/AspNetCoreHostingModel&gt;
    &lt;/PropertyGroup&gt;
  
    &lt;ItemGroup&gt;
      &lt;PackageReference Include="Microsoft.AspNetCore.App" /&gt;
      &lt;PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="2.2.2" /&gt;
      &lt;PackageReference Include="Microsoft.Windows.Compatibility" Version="2.0.1" /&gt;
      &lt;PackageReference Include="Sendgrid" Version="9.10.0" /&gt;
      &lt;PackageReference Include="Stripe.net" Version="22.8.1" /&gt;
      &lt;PackageReference Include="UAParser" Version="3.1.36" /&gt;
    &lt;/ItemGroup&gt;
  
    &lt;ItemGroup&gt;
      &lt;Folder Include="Data\Migrations\" /&gt;
    &lt;/ItemGroup&gt;
  
  &lt;/Project&gt;
  </code></pre>