Stop AutofacBootstrapper fighting Fody

See #211
This commit is contained in:
Antony Male 2021-02-13 22:46:06 +00:00
parent d228af4ccc
commit 520fe7416d
1 changed files with 3 additions and 1 deletions

View File

@ -43,7 +43,9 @@ namespace Bootstrappers
builder.RegisterType<WindowManager>().As<IWindowManager>().SingleInstance();
builder.RegisterType<EventAggregator>().As<IEventAggregator>().SingleInstance();
builder.RegisterType<MessageBoxViewModel>().As<IMessageBoxViewModel>().ExternallyOwned(); // Not singleton!
builder.RegisterAssemblyTypes(this.GetType().Assembly).ExternallyOwned();
// See https://github.com/canton7/Stylet/discussions/211
builder.RegisterAssemblyTypes(this.GetType().Assembly).Where(x => !x.Name.Contains("ProcessedByFody")).ExternallyOwned();
}
/// <summary>