I've tried to update my application from Prism v4.0 to Prism v6.1.0 and run package manager: PM> Install-Package Prism.Core
and PM has installed such packages:
- Microsoft.Practices.Prism.Composition.dll
- Microsoft.Practices.Prism.Interactivity.dll
- Microsoft.Practices.Prism.Mvvm.dll
- Microsoft.Practices.Prism.Mvvm.Desktop.dll
- Microsoft.Practices.Prism.PubSubEvents.dll
- Microsoft.Practices.Prism.SharedInterfaces.dll
- Microsoft.Practices.ServiceLocation.dll
The next step I've tried to create bootstrapper:
public class Bootstrapper : UnityBootstrapper
{
protected override DependencyObject CreateShell()
{
return Container.Resolve<Shell>();
}
protected override void InitializeShell()
{
base.InitializeShell();
App.Current.MainWindow = (Window)Shell;
App.Current.MainWindow.Show();
}
protected override void ConfigureContainer()
{
base.ConfigureContainer();
Container.RegisterType<IShellViewModel, ShellViewModel>();
}
protected override RegionAdapterMappings ConfigureRegionAdapterMappings()
{
RegionAdapterMappings mappings = base.ConfigureRegionAdapterMappings();
mappings.RegisterMapping(typeof(StackPanel), Container.Resolve<StackPanelRegionAdapter>());
return mappings;
}
protected override IModuleCatalog CreateModuleCatalog()
{
ModuleCatalog catalog = new ModuleCatalog();
catalog.AddModule(typeof(ModuleBModule));
return catalog;
}
}
and I've tried to resolve the UnityBootstrapper
. However, there is no such a class at Prism 6.1.0.
So I've tried to install by Nuget:
Prism.UnityExtesions
However NuGet says: This package is no longer supported. Please use the new Prism.Unity package
.
There is a bootstrapper class with Prism 5.0. But Prism 5.0 is not supported now. For example, in this example HelloWorld from code.msdn.
So to my mind come the question: How to create bootstrapper at Prism 6.1.0?