NUnit3 couldn't locate assembly "FSharp.Core 4.4.1.0" - Not used in rest of project

0

I use NUnit3 to run all of my tests, and NUnit3TestAdapter within Visual Studio 2017. When running tests in a build on TFS i get the error:

System.IO.FileLoadException : Could not load file or assembly 'FSharp.Core, Version=4.4.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

All projects in my solution use FSharp.Core 4.5.2.0.

I've ensured that all projects use version 4.5.2.0, and have set up binding redirects to this version in all projects.

I've tried changing the reference to FSharp.Core in my test-project to use 4.4.1.0 (setting path to 'C:\Program Files (x86)\Reference Assemblies\Microsoft\FSharp\.NETFramework\v4.0\4.4.1.0\FSharp.Core.dll', and set the binding redirect in app.config to 4.4.1.0 - but with no luck.

I had a similar issue that i fixed earlier.

I had an error saying it couldn't load the assembly "nunit.framework, Version=3.9.0.0"

At that point i was using version 3.11.0.0, and fixed the issue by downgrading.

I've tried the same approach with FSharp.Core, but with no luck.

I'm using NUnit3TestAdapter 3.12.

I thought maybe NUnit3TestAdapter might just be dependent on "nunit.framework 3.9.0.0" and "FSharp.Core 4.4.1.0", but i haven't found anything about it when looking at documentation for NUnit3TestAdapter.

I've looked at related question and tried solutions by deleting project\bin and project\obj folders and building again.

Tests run fine in VS17 locally.

Is there a dependency for NUnit3TestAdapter that I'm not aware of, or might there be some package versions being inherited by other projects?

EDIT: The reference to FSharp.Core in .fsproj:

   <Reference Include="FSharp.Core">
     <HintPath>..\packages\FSharp.Core\lib\net45\FSharp.Core.dll</HintPath>
     <Private>True</Private>
     <Paket>True</Paket>
   </Reference>

My references are:

FSharp.Core

FsUnit.NUnit

mscorlib

nunit.framework

Nunit3.TestAdapter

System

System.Core

System.Numerics

Project A

Project B

.net
tfs
package
nunit-3.0
asked on Stack Overflow Jan 7, 2019 by Søren Brix • edited Jan 9, 2019 by Søren Brix

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0