Closed cjlapao closed 6 years ago
Thanks for contacting us, @cjlapao. Can you please share with us a sample repro project, which we can use to investigate the problem?
@NTaylorMullen, can you please look into this? Thanks!
Hi Artak,
But of course.
As you can see by the captured screens the taghelper is not recognised by the razor page. this was working recently. when compiling the custom tags are not processed and therefore the html is not rendered correctly or as expected.
To notice that the Microsoft.AspNetCore.Mvc.TagHelpers works correctly as expected, just not the ones i have created.
I have looked into the docs and downloaded the samples and have the same issue. that ones are not rendered.
I also already repaired the VisualStudio installation with no avail
this is a different project from the one i have showed earlier and running on a different machine that has the same problem
@cjlapao when typing C# in your Razor files do you get C# completion? Looking at your screenshots it looks like the C# experience is busted. I tried this out locally and didn't have an issue:
@vank-ms What other steps can @cjlapao take to repair his dev environment? He said he already repaired his VS.
On one of my projects changing the @addTagHelper just to contain the first part of the namespace fixed the issue
so I have changed the _ViewImports.cs to the following
@using SysAdmin
@using SysAdmin.Models
@using SysAdmin.Models.ViewModels
@using SysAdmin.Infrastructure
@using SysAdmin.Infrastructure.Mail
@addTagHelper *, SysAdmin
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
but the taghelper is in the namespace SysAdmin.Infrastructure and this was working previously
on the more complex project with a lot of taghelpers and a very complex structure of namespaces this change did not work.
i do have c# competion and also have the Microsoft.AspNetCore.Mvc.TagHelpers working when typing in my Razor files it just does not show the custom taghelpers i have created.
This also does not get processed when compiling and therefore the page is renderend with the
Ah @cjlapao the @addTagHelper
directive does not take a namespace
it takes an assembly name. That would be your issue.
@NTaylorMullen
It now works fine on both projects as one of them had a assembly name change and I did not notice that the last part of the directive was the assembly name and not main namespace.
Thank you for your help.
Glad everything is working!
All my custom TagHelpers stop being rendered by razor on VisualStudio and also not being rendered when the application started. This was working previously before the update.