I am currently trying to complete this tutorial to get Prism to work with Spring.net.
After referencing Prism4 and Spring.Net through NuGet (or manualy referencing the assemblies), setting up a bootstrapper and running the application I get a “File or Assembly “System, Version=1.0.3300.0, Culture=neutral, …” FileNotFoundException.
I am succesfully using Prism and Spring.Net in seperate projects. Above exception only occours in a project where Prism AND Spring.net is referenced. Spring.net is not even used in code or app.config. Searching various sites I could not find any informations on version issues or similar problems.
namespace PrismSpringSandbox {
/// <summary>
/// Interaktionslogik für "App.xaml"
/// </summary>
public partial class App : Application {
protected override void OnStartup(StartupEventArgs e) {
base.OnStartup(e);
Bootstrapper bootstrapper = new Bootstrapper();
bootstrapper.Run();
}
}
}
The Exception occours on “bootstrapper.Run()”.
namespace HelloWorld {
public class Bootstrapper : UnityBootstrapper {
protected override DependencyObject CreateShell() {
Shell1 shell = new Shell1();
shell.Activate();
RegionManager.UpdateRegions();
shell.Show();
return shell;
}
protected override IModuleCatalog CreateModuleCatalog() {
DirectoryModuleCatalog catalog = new DirectoryModuleCatalog{ModulePath = @".\"};
//ModuleCatalog catalog =
// new ModuleCatalog().AddModule(typeof(HelloWorldModule.HelloWorldModule)).AddModule(
// typeof(SecondaryModule.SecondaryModule));
return catalog;
}
}
}
Maybe someone knows a solution for this problem when trying to use current Prism with current Spring.Net versions.
Ok, got it!
Problem was a reference to unity while referncing spring.net at the same time.