vb.net - How to prevent compilation succeeding via diagnostic? -
i'm using roslyn supplied in vs14 ctp 4 release, can't seem create compilation not succeed when diagnostic reveals issue should treated error. 2 ways i've tried below.
sub adderror(msg string, d action(of diagnostic), st syntaxtree, offset integer, s indexspan) dim r new diagnosticdescriptor(diagnosticid, "", messageformat, category, diagnosticseverity.error, true) dim q = diagnostic.create(diagnosticid, category, string.format(messageformat, msg), diagnosticseverity.error, true, 0, false, description,, location.create(st, textspan.frombounds(offset + s.index + 1, offset + s.index + s.span))) d(q) ' d(diagnostic.create(r, location.create(st, textspan.frombounds(offset + s.index + 1, offset + s.index + s.span)), msg)) end sub i don't know if issue ide not propagating error? or need different prevent compilation?
vb.net roslyn
No comments:
Post a Comment