Skip to content

Latest commit

 

History

History
30 lines (18 loc) · 1.24 KB

readme.md

File metadata and controls

30 lines (18 loc) · 1.24 KB

ReSharper external annotations plugin for ASP.NET WebApi 2

Simple example, that explains everything

Before

Code Issues without external annotations

After

No Code Issues after

Annotations for System.Web.Http

Core WebApi functionality is located in System.Web.Http.dll from Microsoft.AspNet.WebApi.Core Nuget.

Marks HttpGetAttribute, HttpPostAttribute and other Http*Attributes with MeansImplicitUseAttribute. So ReSharper no longer suggests to remove unused WebApi methods.

Also marks ApiController with UsedImplicitlyAttribute(ImplicitUseKindFlags.Access) to prevent warning class MyController is never used when MyController is inherited from ApiController.

Tested with:

  • Resharper 9.0 and Visual Studio 2013,
  • Resharper 10.0 and Visual Studio 2015.

Installation note

  • Clean ReSharper project cache Resharper->Options->Environment->General->Clear Caches.
  • Restart Visual Studio.

https://resharper-plugins.jetbrains.com/packages/WebApi.Annotations/