Question

I'm using MigratorDotNet to do migrations. I give it a string to my Assembly My_Assembly which is built on Sharp Arch v2. Sharp Arch v2 is built on Fluent Nhibernate 1.3.0.727.

My project is using 1.3.0.737

I'm getting the following error when MigratorDotNet calls Assembly.GetExportedTypes:

System.IO.FileNotFoundException: Could not load file or assembly 'FluentNHibernate, Version=1.3.0.727, Culture=neutral, PublicKeyToken=8aa435e3cb308880' or one of its dependencies. The system cannot find the file specified.

I'm familiar with BindingRedirects but would prefer to not change source code for MigratorDotNet (it does't pull in external config).

Is there a way I can force the new version and prevent the FileNotfoundException?

P.S. I know there a lot of similar-phrased questions but those are usually resolved by binding redirects, ensuring Copy Local = true, adding assemblies to the GAC, etc. I think this question is more generic.

Was it helpful?

Solution

I hate to say it, but I think you are going to have to live with binding redirects. I've not found a way to do what you are asking yet myself, but would love to see if there is one.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top