I have used this method before in the assemblyInfo.cs folder of an asp.net mvc4 project. I am starting a new application and putting together the foundation and so far I have added ninject and log4net.
Now I am trying to call a static method from a class stored in the App_Start folder using:
[assembly: System.Web.PreApplicationStartMethod(
typeof (Dashboard.App_Start.EnvironmentConfigFileMover), "CloneEnvironmentConfigDirectory")]
in my assemblyInfo.cs file. And the class method isn't being called. I checked the spelling of the method against what is being used and no issues, and I am inserting a breakpoint and it just ignores me. Very frustrating. I have seen similar posts with issues using the preapplicationstartmethod from WebActivator. I have read WebActivator is built on top of system.web's preapplicationstartmethod, and I only need a simple method call, so I don't even need WebActivator which I doubt adding to my project will work since I can't even get the system.web one to work.
Anything I should be looking at to see what the issue is? Maybe did ninject or log4net make any changes somewhere that could be interfering with this?
Thanks!
Update: Btw I am running this locally on my laptop not server.