title: ASP.NET Core 2.0 TagHelper errors after upgrade
body: <p>I am getting this cryptic error after updating my ASP.NET MVC Service running in Service Fabric. After a lot of faffing around with the actual upgrade I managed to get it running on my local Service Fabric on my machine.</p>
  
  <p>I am now trying to deploy it to an actual Service Fabric cluster. I am now getting errors such as:</p>
  
  <pre><code>Error RZ3501: Invalid tag helper bound property 'RouteValues' on tag helper 'Microsoft.AspNetCore.Mvc.TagHelpers.AnchorTagHelper'. 
  'Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeNameAttribute.DictionaryAttributePrefix' must be null unless property type implements 'IDictionary&lt;string, TValue&gt;'.
  (0,0): Error RZ3501: Invalid tag helper bound property 'RouteValues' on tag helper 'Microsoft.AspNetCore.Mvc.TagHelpers.FormActionTagHelper'.
  </code></pre>
  
  <p>Note that I have not changed any code during the upgrade of the ASP.NET MVC service to version 2.0</p>
  
  <p>This is a sample of how I used TagHelpers:</p>
  
  <pre><code>@{
      IDictionary&lt;string,string&gt; routeData = SpecialMethodThatCalculatesRouteData();
  }
  
  &lt;a asp-route="MyRoute" asp-all-route-data="@routeData" &gt;
  </code></pre>
  
  <p>This code worked fine before the upgrade.</p>
  
  <p>Has anybody stumbled upon this?</p>
  
  <p>Thanks</p>
  
  <p>EDIT: These are the references I have in the csproj file:</p>
  
  <pre><code>&lt;PackageReference Include="CompressedStaticFiles" Version="1.0.3" /&gt;
  &lt;PackageReference Include="Microsoft.AspNetCore" Version="2.0.0" /&gt;
  &lt;PackageReference Include="Microsoft.AspNetCore.Authentication.Cookies" Version="2.0.0" /&gt;
  &lt;PackageReference Include="Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore" Version="2.0.0" /&gt;
  &lt;PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="2.0.0" /&gt;
  &lt;PackageReference Include="Microsoft.AspNetCore.Mvc" Version="2.0.0" /&gt;
  &lt;PackageReference Include="Microsoft.AspNetCore.StaticFiles" Version="2.0.0" /&gt;
  &lt;PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="2.0.0" PrivateAssets="All" /&gt;
  &lt;PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="2.0.0" /&gt;
  &lt;PackageReference Include="Microsoft.ServiceFabric" Version="5.7.198" /&gt;
  &lt;PackageReference Include="Microsoft.ServiceFabric.AspNetCore.WebListener" Version="2.7.198" /&gt;
  &lt;PackageReference Include="Microsoft.ServiceFabric.Data" Version="2.7.198" /&gt;
  &lt;PackageReference Include="Microsoft.ServiceFabric.Services" Version="2.7.198" /&gt;
  &lt;PackageReference Include="Microsoft.ServiceFabric.Services.Remoting" Version="2.7.198" /&gt;
  &lt;PackageReference Include="Microsoft.VisualStudio.Web.BrowserLink" Version="2.0.0" /&gt;
  &lt;PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.1.1" /&gt;
  &lt;PackageReference Include="Microsoft.ApplicationInsights.ServiceFabric.Native" Version="1.0.0-beta2" /&gt;
  &lt;PackageReference Include="NETStandard.Library.NETFramework" Version="2.0.0-preview2-25405-01" /&gt;
  &lt;PackageReference Include="Newtonsoft.Json" Version="10.0.3" /&gt;
  &lt;PackageReference Include="React.AspNet" Version="3.1.0" /&gt;
  &lt;PackageReference Include="Microsoft.Azure.DocumentDB" Version="1.17.0" /&gt;
  &lt;PackageReference Include="Microsoft.Extensions.Caching.SqlServer" Version="2.0.0" /&gt;
  </code></pre>
  
  <p>EDIT: More info. I had to add these tasks to my build definition in VSTS to get the project to compile</p>
  
  <p><a href="https://i.stack.imgur.com/VJhqb.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/VJhqb.png" alt="snip from VSTS build definition"></a></p>