0
votes

In order to make Elmah.MVC package work in VB.NET projects as well, I've create ASP.NET MVC3 VB.NET application added WebActivator Nuget package (v.1.5.1), in App_Start folder inserted simple code, like

[assembly: WebActivator.PreApplicationStartMethod(typeof(Elmah.Mvc.Web.App_Start.ElmahMvc_Start), "Start")]

namespace Elmah.Mvc.Web.App_Start
{
    public class ElmahMvc_Start
    {
        public static void Start()
        {
            Elmah.Mvc.Bootstrap.Initialize();
        }
    }
}

The project built fine, but I never hit Elmah.Mvc.Bootstrap.Initialize(); line.

Does WebActivator work with VB.NET? I wounder if not, cause a lot of different projects using WebActivator (Ninject, StructureMap etc.) are they supported in VB.NET?

1

1 Answers

2
votes

WebActivator should work in any language, as it's a pure runtime component. But I'm confused how you can end up using C# code like this in your VB app. Shouldn't you write this in VB? Maybe the C# files is just getting ignored as it is, which is why it doesn't work?