0

I have a problem whereby some where in my migration, an external library (NodaTime.Serialization.ServiceStackText) method requires the old version of NodaTime to run but my current assembly is using the latest version of NodaTime. I learned that a Class Library (FluentMigrator) does not load app.config where all the bindingRedirects are specified and therefore my migrations can't run successfully.

How should i solve this? Any suggestions will be appreciated! Thanks in advance.

icube
  • 2,578
  • 1
  • 30
  • 63
  • bindingRedirects are part of executable app.config (your app). Have you tried to add it? – MistyK Feb 24 '17 at 16:19
  • Well, why don't you just update the library? If the latest nuget package doesn't help then [just build from source](https://github.com/AnthonyCarl/NodaTime.Serialization.ServiceStackText). – Hans Passant Feb 24 '17 at 16:57
  • By "latest" do you mean you're using 1.3.2 or 2.0.0-betax? If you're trying to use 2.0 and ServiceStackText is using 1.x, that will definitely be a problem - Noda Time 2.0 isn't backward compatible (otherwise it would be 1.4...). If you're using 1.3.2 and ServiceStackText is using 1.2.0 or something like that, the binding redirect should work when your app is loaded... – Jon Skeet Feb 25 '17 at 07:25
  • @Zbigniew as I am running the tool(.exe) from FluentMigrator, i don't know how to tell FluentMigrator to use my app.config. If you do know how, please let me know. – icube Feb 25 '17 at 11:21
  • @HansPassant hmmm i will go this route if there are no other ways.. thanks for the suggestion – icube Feb 25 '17 at 11:22
  • @JonSkeet i'm not using the latest 2.0.0-beta.. i'm using v1.3.2 – icube Feb 25 '17 at 11:23
  • It sounds like possibly want to write an app.config specifically for that executable then - just name it the same as the exe with .config on the end, and I'd *expect* it to do the right thing. – Jon Skeet Feb 25 '17 at 11:40

0 Answers0