resharper and xml literals

 

        Dim sql As String = <query>Select fname,lname from tblCustomer where status &lt;&gt; 'Active'</query>



Here is a pattern some of our developers use that make use of xml literals for store query strings or sometimes other long blocks of text.  Usually it's longer than the above statement.  This hasn't been a problem until we started using ReSharper.  ReSharper does not like the &lt;&gt; and says it's an error indicating " expected.

There are workarounds for this.  wrapping it with CDATA works is there any way to suppress this error or have ReSharper recognize it as valid? I'm new to ReSharper so not sure if there is a way.

1 comment
Comment actions Permalink

I have the same problem, this was the only reason I sometimes wish I could disable resharper without uninstalling it but I didn't know about the CDATA trick

0

Please sign in to leave a comment.