I am using the following simple TagHelper:
It works correctly but compiles with the following warning:
Warning Element 'kendo-datepicker' does not allow content and cannot have separate end tag.
I cannot get rid of the warning, what does it mean and how do I get rid of it?
4 Answers, 1 is accepted
I tried to recreate the behavior you are observing, but I am not getting any warnings on my end:
Could you please send us an isolated sample where the issue occurs, so we can investigate locally your exact case and help you more efficiently.
Thanks for helping out. You are not observing the error because you have not yet enable razor intellisense. I can see this in your video as your tag helper is not purple. You can do this by going to Tools / "Extensions and Updates". Click on Online in the left column, and use the search box to locate "Razor Language Services." Install the extension and restart VS 2017.
After that your taghelper should be purple and you should see the error when you re add the taghelper. Please note: Sometimes the error does not show until you retype taghelper.
Me providing you with a sample project will not help unless you have the intellisense working and if you do this the error should show up in your project, I created a new project just like yours and the error showed up.
The extension is a third party tool and we are not able to control its behavior. Nevertheless, you can avoid this warning by declaring the tag helper as self-closing tag, e.g.: