SharePoint and LightSwitch Support in ReSharper 7

The ReSharper team here at JetBrains has added support for SharePoint and LightSwitch projects to ReSharper 7. Due to how these project types handle generated partial classes, previous versions of ReSharper displayed errors even though the project compiled successfully. By implementing support for these project types in ReSharper 7, ReSharper no longer displays spurious errors allowing developers to be more productive when using these project types. To see the improvements in action, let’s look at a SharePoint project and a LightSwitch project using ReSharper 6.1 and ReSharper 7.

Creating a SharePoint Site Definition project, ReSharper 6.1 displayed 3 errors in one file:

SharePoint Site Definition project with ReSharper 6.1

With ReSharper 7, that same project shows no errors:

SharePoint Site Definition project with ReSharper 7.0

ReSharper 7 now understands SharePoint-specific master pages, resources, style sheets, and JavaScript files, which dramatically reduces the number of false errors reported by ReSharper’s analysis engine.

Screen Shot 2012-08-02 at 3.48.55 PM.png

Screen Shot 2012-08-02 at 3.51.06 PM.png

If you open the LightSwitch Course Manager in Visual Studio, ReSharper 6.1 displayed 170 spurious errors across 16 files:

LightSwitch Course Manager with ReSharper 6.1

With ReSharper 7, no errors are displayed:

LightSwitch Course Manager with ReSharper 7.0

ReSharper 6.1 couldn’t locate partial methods or certain global LightSwitch-related classes such as User or Permissions:

Error in User class with ReSharper 6.1

ReSharper 7 can:

No errors in User class with ReSharper 7.0

ReSharper 6.1 couldn’t locate model partial classes or base classes:

SharePoint partial classes can't be resolved with ReSharper 6.1

ReSharper 7 can:

ReSharper 7.0 resolves SharePoint partial classes

Notice that ReSharper 7 provides quick-fixes for unused parameters, superfluous “this” usage, and all the other great features you expect from ReSharper. The SharePoint and LightSwitch enhancements in ReSharper 7 work for both C# and VB.NET projects. SharePoint and LightSwitch developers can now develop with pleasure too!

This entry was posted in News and Events and tagged , . Bookmark the permalink.

8 Responses to SharePoint and LightSwitch Support in ReSharper 7

  1. eddi says:

    Hello,
    i use ReSharper 7.1.3 and VS2012 Update 2 for a Lightswitch Project.
    ReSharper still displayes errors even though the project compiled successfully.

    Is ther a error in my ReSharper config?

    Eddi

  2. @eddi
    Are you using solution-wide analysis? Does your problem feel similar to this one?

  3. eddi says:

    @Jura
    thanks for your fast response.

    There is no difference if the checkbox (Code Inspection Setings: “Analyse errors in whole solution”) is disabled or enabled.

    And Yes my problem is similar to this one in your Link.

  4. Eric Andersen says:

    We are having the same problem as eddi. We definitely have the release of Visual Studio Update 2, and Resharper 7.1.3. It makes developing Lightswitch 2012 with resharper on nearly impossible. It seems to be the partial methods generated in /GeneratedArtifiacts that it’s mostly having a problem with. Because this folder isn’t part of the solution, I can’t add it to the list of generated objects in resharper options either.

  5. @eddi, @Eric Thanks for your input. I’ll see if we can fix that before 8.0.

  6. Alexander Kurakin says:

    @eddi, @Eric Please try out the following private development build https://dl.dropboxusercontent.com/u/96262710/ReSharperSetup.7.1.3000.2559.msi and let me know about the result. Thanks!

  7. Eric Andersen says:

    @Alexander, First pass it looks to be working correctly with that build

  8. Eric Andersen says:

    @Alexander, Confirmed on a few different machines. Will this be included in a future official 7.x patch?

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>