Reputation: 6085
I created a tag helper and wanted to use that in my Blazor sample project. However, when I want to use the tag helper, the compiler complains about that:
CS0103 The name 'StartTagHelperWritingScope' does not exist in the current context FirstBlazorApp
.
What is additionally required to make tag helpers work in Blazor?
Upvotes: 11
Views: 11497
Reputation: 6085
Tag helpers are not supported in Blazor. At least not as of now.
Upvotes: 9
Reputation: 311
I know this is an old question but I just discovered you can use Partial Components inside of Razor Components. So if you want to use tag helpers, move the elements that need them to a partial and include it in the Razor Component.
Upvotes: 4
Reputation: 944
On A blazor page you would use a blazor component, this is like a TagHelper but it runs client side and is like an Angular component (or similar in any other client side JS framework) is that respect. TagHelpers run on the Server and blazor components run on the client, both allow you to create new tags. a simple component in the blazor same is the NavMenu which lives currently in the Shared folder.
Upvotes: 4