-
Notifications
You must be signed in to change notification settings - Fork 223
VS reports Invaliud tag helper property even though now supported #1444
Comments
@ajaybhargavb could you investigate this guy? |
@deap82, I tried to reproduce your issue but couldn't. Which version of Razor/Mvc are you using? If possible, could you share a sample repro app? |
@ajaybhargavb I'm on an asp.net core mvc app, not sure what kind of version definition (number) you are asking for. Could you perhaps start with sharing your repro app and I can quickly see if I get the error in my environment? |
I meant the versions you are referencing in your csproj. (If you right-click your project -> Edit MyProject.csproj) |
Version 1.1.1 for Microsoft.AspNetCore.Mvc.Core, Microsoft.AspNetCore.Mvc and Microsoft.AspNetCore.Mvc.Razor. |
@deap82, I tried reproducing with a 1.1 app but still couldn't. Here is the app that I used https://github.com/ajaybhargavb/TestApp/tree/master/WebApplication1. The VS version I used was |
I have created a TagHelper that has a property of type IDictionary<string, ModelExpression>
According to this GH Issue, it was originally not supported, but now it should be: aspnet/Mvc#5310
And my TagHelper is working as expected.
But if I build my project when a view file (*.cshtml) that uses this tag helper is open in VS. I get the following output in VS Error List: Error Invalid tag helper property 'SomeNamespace.SomeTagHelper.some-prefix'. Dictionary values must not be of type 'Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExpression'.
Could it be that the support for properties of type IDictionary<string, ModelExpression> in TagHelpers also requires some update to VS 2017 in order to not get this error message? Currently It's a bit confusing, especially for fellow developers that might not have insight into this.
This issue is also posted here:
https://developercommunity.visualstudio.com/content/problem/66937/vs-reports-invaliud-tag-helper-property-even-thoug.html
The text was updated successfully, but these errors were encountered: