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.
I am now trying to deploy it to an actual Service Fabric cluster. I am now getting errors such as:
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<string, TValue>'.
(0,0): Error RZ3501: Invalid tag helper bound property 'RouteValues' on tag helper 'Microsoft.AspNetCore.Mvc.TagHelpers.FormActionTagHelper'.
Note that I have not changed any code during the upgrade of the ASP.NET MVC service to version 2.0
This is a sample of how I used TagHelpers:
@{
IDictionary<string,string> routeData = SpecialMethodThatCalculatesRouteData();
}
<a asp-route="MyRoute" asp-all-route-data="@routeData" >
This code worked fine before the upgrade.
Has anybody stumbled upon this?
Thanks
EDIT: These are the references I have in the csproj file:
<PackageReference Include="CompressedStaticFiles" Version="1.0.3" />
<PackageReference Include="Microsoft.AspNetCore" Version="2.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.Cookies" Version="2.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore" Version="2.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="2.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="2.0.0" />
<PackageReference Include="Microsoft.AspNetCore.StaticFiles" Version="2.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="2.0.0" PrivateAssets="All" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="2.0.0" />
<PackageReference Include="Microsoft.ServiceFabric" Version="5.7.198" />
<PackageReference Include="Microsoft.ServiceFabric.AspNetCore.WebListener" Version="2.7.198" />
<PackageReference Include="Microsoft.ServiceFabric.Data" Version="2.7.198" />
<PackageReference Include="Microsoft.ServiceFabric.Services" Version="2.7.198" />
<PackageReference Include="Microsoft.ServiceFabric.Services.Remoting" Version="2.7.198" />
<PackageReference Include="Microsoft.VisualStudio.Web.BrowserLink" Version="2.0.0" />
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.1.1" />
<PackageReference Include="Microsoft.ApplicationInsights.ServiceFabric.Native" Version="1.0.0-beta2" />
<PackageReference Include="NETStandard.Library.NETFramework" Version="2.0.0-preview2-25405-01" />
<PackageReference Include="Newtonsoft.Json" Version="10.0.3" />
<PackageReference Include="React.AspNet" Version="3.1.0" />
<PackageReference Include="Microsoft.Azure.DocumentDB" Version="1.17.0" />
<PackageReference Include="Microsoft.Extensions.Caching.SqlServer" Version="2.0.0" />
EDIT: More info. I had to add these tasks to my build definition in VSTS to get the project to compile