Well, I found the answer :) The problem is here:
The Caliburn.Micro.Autofac.AutofacBootstrapper<TRootViewModel>
in Caliburn.Micro.Autofac nuget package (version="1.5.0") extends Caliburn.Micro.Bootstrapper<TRootModel>
in Caliburn.Micro package, and has a constructor like this:
public AutofacBootstrapper() : base(true) { }
It means it calls the base.ctor
by passing a boolean
argument (base.ctor(bool)
). And here is the thing. The Caliburn.Micro.Bootstrapper<TRootModel>
in version 1.5.1
has a constructor with a bool
parameter:
public Bootstrapper(bool useApplication = true) : base(useApplication) {
this.Start();
}
while in version 1.5.2
, it has only one parameter-less constructor:
public Bootstrapper() : base(true) {
this.Start();
}
Here is the signatures:
// Assembly: Caliburn.Micro.Autofac, Version=1.5.0.0
namespace Caliburn.Micro.Autofac {
public class AutofacBootstrapper<TRootViewModel> : Bootstrapper<TRootViewModel> {
public AutofacBootstrapper() : base(true) { }
}
}
// Assembly: Caliburn.Micro, Version=1.5.1.0
namespace Caliburn.Micro {
public class Bootstrapper<TRootModel> : BootstrapperBase {
public Bootstrapper(bool useApplication = true) : base(useApplication) {
this.Start();
}
}
}
// Assembly: Caliburn.Micro, Version=1.5.2.0
namespace Caliburn.Micro {
public class Bootstrapper<TRootModel> : BootstrapperBase {
public Bootstrapper() : base(true) {
this.Start();
}
}
}
So, the Caliburn.Micro.Autofac, Version=1.5.0.0
cannot be used with Caliburn.Micro, Version=1.5.2.0
and you have to create your own AutofacBootstrapper
, which is easy to implement by referring the original one (here) or reading the nuget packages source. Also, here is my re-implemented one, if you need.