NinjectMVC3 WebActivator.PreApplicationStartMethod assembly attribute triggers warnings in my source editors

When using the NinjectMVC3 attribute WebActivator.PreApplicationStartMethodin my web application

[assembly: WebActivator.PreApplicationStartMethod(typeof(MyProject.App_Start.NinjectMVC3), "Start")]

I see the following warning in each of the source editor files:

xxx.cshtml: ASP.NET runtime error: start of pre-application initialization method Launch as WebActivator.ActivationManager exception with the following error message: The exception was thrown by the call target .. xxx.cshtml 1 1

it appears as bluish in the first line of each of my view files (for example, ad @usingor @model). Please note that the application works fine, the problem is only when editing the source files of my view (visual error / warning analysis in real time).

I can check what WebActivator.PreApplicationStartMethodis the reason by commenting on this.

How can i fix this?

+5
source share
2 answers

WebActivator is not a component of Ninject, it is provided by Microsoft and is supported by David Ebbo, the architect of the MVC team. Ninject simply uses WebActivator to install without changing global.asax.

, , . , Resharper CodeRush?

, ​​ WebActivator ( NuGet ). , - ?

, , , . , , , , .

, .

+2

, ... , . , .

0

All Articles