MVC Project quirks

The first issue is resharper suggests renaming the Application_Start() method located in the MVC filee Global.asax.cs, having to place the comments to avoid it potentially breaking the project (haven't tried the suggestion)

 
// ReSharper disable InconsistentNaming
protected void Application_Start()
// ReSharper restore InconsistentNaming
{
    AreaRegistration.RegisterAllAreas();

    RegisterRoutes(RouteTable.Routes);
}



Second issue, 4 "Potential Code Quality Issues" are flagged which appear to be VS2010 related?


  Potential Code Quality Issues (4 issues)
    Unknown property in build script (3 issues)
      Property 'VS100COMNTOOLS' is not defined
      Property 'VS100COMNTOOLS' is not defined
      Property 'MSBuildExtensionsPath32' is not defined
    Unknown task in build script (1 issue)
      Task 'AspNetCompiler' is not defined


Resharper also seems to be fond of suggestion inverting if statements that don't do much e.g.

 
if (item != null)
{
     // Do stuff
}
else
{
    throw new NullReferenceException("Message here");
}



to:

 
if (item == null)
{
    throw new NullReferenceException("Message here");
}
else
{
     // Do stuff
}



Don't really see the benefit in the readability or even reducing nesting? Perhaps just a personal preference issue.

Resharper seems to struggle on files > 3000 lines, the project has a few legacy classes that have yet to be split out and refactored and attempting to use resharper with them results in a huge IDE slow down. Again, these files are company IP and cannot be provided as examples. Perhaps is there a way to reduce the number of refreshes resharper attempts to do on larger files?

Last issue is a lot of redundant "else" statements detected that appear to be related to population from controller values. Can't post examples, but might have a go at creating one. I've debugged and managed to hit the code it suggested is redundant.

Please sign in to leave a comment.