Closed stevenbenitez closed 2 years ago
This is an issue with the ReSharper engine not detecting attributes in external libraries. There's an issue currently in the JetBrains YouTrack system to address it, but I don't have an ETA. :(
Update: Let me play around again and see if it's an issue in the library.
Huh... you were right. The issue seems to be the []
. I've just removed them and pushed a change up. Not sure why I had them there in the first place. I may have been reading some outdated docs or something. I can't remember, but I tested locally and pushed up a 0.0.16
release. It should be on NuGet soon. Please test and let me know if this fixes it on your end.
Thanks, @khalidabuhakmeh! That fixed it.
One other thing that I think would be worth adding is putting [AspMvcAction]
, [AspMvcController]
, and [AspMvcArea]
attributes from JetBrains Annotations on the Action
, Controller
, and Area
properties. I'm not sure if there are any attributes available for the Razor Page property.
I'm happy to create a new issue for the JetBrains Annotations since it's outside of the scope of the original problem for this issue. Also happy to put a PR together to add support, if that's something you agree with.
They're already there. That was the initial bug I thought you were talking about. For some reason, Rider/ReSharper doesn't recognize these attributes from external libraries. I filed an issue in the official JetBrains repo about it already so 🤞.
Thanks for using the library. I hope you find it helpful.
I do, thanks for your work putting it together!
@stevenbenitez HEY IT WORKS NOW! v0.0.18
. Turns out I had to compile JetBrains.Annotations
into the assembly. The NuGet Package only works for local projects. Give it a try. I just did and it seems to work.
Yep, works perfectly. Thanks!
I'm not sure if this is an Htmx.TagHelpers issue or a JetBrains Rider issue. I am using the Htmx.TagHelpers and they work great. Razor converts the following code into an
hx-get="/actual/path/to/controller"
.However, Rider does not pick up the
hx-controller
andhx-action
attributes as tag helper enhanced. Looking at the code for the tag helper, I see they are defined using square brackets.If I instead change my code to include the brackets, then Rider bolds the attributes but Razor no longer processes them.