Simple example, that explains everything
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.
- Clean ReSharper project cache Resharper->Options->Environment->General->Clear Caches.
- Restart Visual Studio.
https://resharper-plugins.jetbrains.com/packages/WebApi.Annotations/