[Rider/Resharper] - Plugin Development - Resolving "Mvc.TemplateNotResolved" with plugin.
Answered
Hi,
I'm developing plugin for CMS that uses “System.ComponentModel.DataAnnotations.UIHintAttribute” to configure how to display properties in website. These templates will resolve during runtime and therefor rider/resharper will throw “Cannot resolve template” errors.
Is it possible to try to resolve this template in the plugin and discard this error if it can resolve it?
For now, i would just hardcode all the possible templates that the CMS provides and then resolve based on those.
Thanks for the advice!
Please sign in to leave a comment.
Unfortunately, a plugin can't extend the resolve itself. However, it can suppress the warning using `IResolveProblemHighligter`, and if it's possible to provide custom details through an annotation, you can use `ICustomCodeAnnotationProvider` to dynamically apply an annotation to some code in your project.
Thank you for the advice.
However, I don't know how to suppress the warning, but i was able to replace the error message.
Can you me small example how to actually suppress the warning?
This is my code so far:
Thanks!
Matt Ellis Can you take a look my comment above, i need a bit more help with the IResolveProblemHighlighter.
Is there any documentation of these things? I can't seems to find any. I guess Resharper plugin docs should document these, but all pages related to this is marked as “coming soon”.