I'm still struggling with VSNET 2005 to get it to let me work the way I
want, so the situation may not be 'standard'. Anyway, here's a little
problem Resharper seems to be having :
I create a project intended to be a web application (for testing purposes).
Just as in VSNET 2003, but not for the same reasons, I used the Class
Library template. I don't intend to use this 'Web Site'...
thing. Don't even get me started on all the 'wonderful' new features of this
IDE. I don't need 50 wizards telling me where to put my application's
settings. I need a development environment.[/unrelated rant]
I add a .ascx file containing this :
I add the corresponding class in a .cs file :
public class Test : System.Web.UI.UserControl
protected System.Web.UI.WebControls.Repeater TestRepeater;
protected System.Web.UI.HtmlControls.HtmlInputHidden TestInput;
ReSharper indicates an error on TestRepeater, saying (in both files) that
the member name is already declared.
TestInput is not affected, the compiler is quite happy with both and
everything runs fine.
The same goes for .aspx files and Page classes.
While I'm at it, two other related things :
ReSharper also indicates an error because he wants me to add 'partial' to
the class definition, though there's no reason to do it.
Last, would it be possible to have an option to make Resharper simply ignore
.aspx and .ascx files ?
The validity checking may be useful from time to time, but not frequently
(in my case anyway). I'm not a fan of having a mix of HTML generated in the
code and 'pure' HTML in the .aspx/.ascx files, so I tend to have many of
those files with mainly 'pure' HTML. RS loses a lot of time on them (at
least on startup), and it's really not that useful (especially when it comes
with errors like the one above that would never appear if the .ascx file
wasn't looked at :)