Replies: 3 comments
-
Although this sounds like an odd bug....
Is there at least some file you can flag, like the project file or something? Or put another way: if the user had to resolve this issue, which file would they be editing? |
Beta Was this translation helpful? Give feedback.
-
I updated my original post after creation, but yes, we're can pass additional file path to the location, or path of the project (which we're getting from msbuild variable). When i double click on the diagnostic in UI - it correctly places me at that file, so the path is valid. But the link is still embedded in the message, instead of being href on diagnostic id |
Beta Was this translation helpful? Give feedback.
-
So if
when i create diagnostic - i put location at "ProjectA.csproj" file (valid location, as i can click the diagnostic and end up in that file), but link is in the message as text |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
When creating a
DiagnosticDescriptor
- we can providehelpLinkUri
variable, which will makr the diagnostic clickable in UI, taking the user to proper documentation, which is very helpful.I've noticed, however, that when the diagnostic is created without a location - the link is instead appended to the message in parenthesis. Is there any way to still make it work as a link in such cases? I don't think it should be related to the presence of a location
The above appens the link to the message as a raw text, while
will produce nice clickable diagnostic id
Looking at a
DiagnosticFormatter.cs
- theLocationKind
has to bein order for the link to be proper, how can i achieve it? I tried
that didn't work
=============
Context:
We wrote an analyzer that's monitoring an additional file, which contains information about unwanted project dependencies (this additional file is populated separately), so there's no proper location in
AdditionalFileAnalysisContext
Beta Was this translation helpful? Give feedback.
All reactions