2017-09-12 6 views
3

F#runtime 4.4.1を対象とする単体テストプロジェクトがあります。bindingRedirectがFSharp.Coreのバージョンに影響しないのはなぜですか?

Could not load file or assembly 'FSharp.Core, Version=4.3.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.

私はFSharp.Core 4.3をロードしようとした理由を疑問に思う:私はテストを実行したとき、私はランタイムエラーを取得し、しかし

<dependentAssembly> 
    <Paket>True</Paket> 
    <assemblyIdentity name="FSharp.Core" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" /> 
    <bindingRedirect oldVersion="0.0.0.0-65535.65535.65535.65535" newVersion="4.4.1.0" /> 
    </dependentAssembly> 

:それはbindingRedirectセクションではapp.configを持っています.0.0 bindingRedirectは異なるバージョンを指定しているためです。

答えて

3

明らかに、これはXUnitコンフィグレーションの問題です。 app.configをで、次のセクションでは、AppDomainの設定を変更:

<appSettings> 
    <add key="xunit.appDomain" value="required" /> 
    </appSettings> 

そして、テストランナーはxunit.execution.desktop.dllを逃し不満。ファイルが実行ディレクトリに配置されると、XUnitランナーはapp.configにbindingRedirect設定を与えました。

関連する問題