I tried updating my application from Prism v4.0 to Prism v6.1.0 and starting the package manager: PM> Install-Package Prism.Core
and PM installed the following 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 tried to create bootstrapper is:
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 tried to enable UnityBootstrapper . However, in Prism 6.1.0 there is no such class. So I tried installing Nuget:
Prism.UnityExtesions
However, NuGet says: This package is no longer supported. Please use the new Prism.Unity package 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.
Therefore, in my opinion, the question arises: How to create a bootloader in Prism 6.1.0?
source share