Ninject Nuget packages updated to Nuget 1.3

Recently we have updated all Ninject Nuget packages to Nuget 1.3. In order to use them you have to update your client to 1.3 as well. This update brought a few improvements:

  • All packages support client profile projects for .NET 4.0 and -NET 3.5
  • Support for WP7 has been added
  • New packages have been added for Ninject.Extensions.Logging, Ninject.Extensions.Interception, Ninject.MockingKernel and Ninject.Web.FluentAssertions
  • Ninject.MVC3 supports injection of HttpApplication (See below)

Notes about the new packages

The packages for Ninject.Extensions.Logging, Ninject.Extensions.Interception and Ninject.MockingKernel shouldn be installed directly. They are base packages for the specific packages. E.g. if you want to use Ninject.Extensions.Logging you have to decide which logging framework you want to use. If you want to use log4net you have to install Ninject.Extensions.Logging.Log4Net which will install the Ninject.Extensions.Logging as depecy.

Changes in Ninject.MVC3

A bug that was introduced with the first nuget package as been fixed. The HttpApplication itself will now be injected again. But as before it only supports property injection. If you update your project from a previous version of Ninject.MVC3 your App_Start\NinjectMVC3.cs might not get updated correctly. Make sure that the Start method looks like the one below after the update:

public static void Start()
{
    DynamicModuleUtility.RegisterModule(typeof(OnePerRequestModule));
    DynamicModuleUtility.RegisterModule(typeof(HttpApplicationInitializationModule));
    bootstrapper.Initialize(CreateKernel);
}

About the author

Remo Gloor

My name is Remo Gloor and I’m working as a software architect at bbv Software Services AG in Zug, Switzerland. My first expiriences with computers were a a little boy with basic programming on a C64, later Pascal an C on an Intel 8080. After finishing my study in software engineering I started working with C#.

Currently, I'm one of two Main Developers of the well known Ninject IoC containers. My other interests beside Ninject are TDD, Scrum and software architecture in general.

Add comment

Recent Posts