vstest: Could not load file or assembly 'Microsoft.VisualStudio.TestPlatform.ObjectModel, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies for net461

I keep getting the assembly binding error for net461:

System.IO.FileNotFoundException: Could not load file or assembly ‘Microsoft.VisualStudio.TestPlatform.ObjectModel, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a’ or one of its dependencies. The system cannot find the file specified.

It passes OK for netstandard2.0 test target library using netstandard2.0(target lib)/netcoreapp2.0(test lib) via the dotnet cli.

However if I remove the adapter, this makes things work through resharper/visual studio.

Any idea’s

Issue Tracker Info

  • NUnit and NUnit3TestAdapter versions
NUnit 3.8.1
NUnit3TestAdapter 3.8.0
  • Visual Studio edition and full version number (see Help About)
Visual Studio Community Edition 15.3.4
  • A short repro, preferably attached or pointing to a git repo or gist
A very noddy wrapper around Castle Windsor. 

 - Clone https://github.com/cryosharp/fluentwindsor/
 - Checkout the `fluentwindsor-next-nunit-adapter-issue` branch
 - cd FluentWindsor\FluentWindsor.Tests
 - dotnet restore
 - dotnet test

  • What .net platform and version is being targeted
.NET Command Line Tools (2.0.0-preview2-006497)

Product Information:
 Version:            2.0.0-preview2-006497
 Commit SHA-1 hash:  06a2093335

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.15063
 OS Platform: Windows
 RID:         win10-x64
 Base Path:   C:\Program Files\dotnet\sdk\2.0.0-preview2-006497\

Microsoft .NET Core Shared Framework Host

  Version  : 2.0.0-preview2-25407-01
  Build    : 40c565230930ead58a50719c0ec799df77bddee9

Full stacktrace of failure

Test run for C:\code\fluentwindsor\FluentWindsor\FluentWindsor.Tests\bin\Debug\net461\FluentWindsor.Tests.dll(.NETFramework,Version=v4.6.1)
Microsoft (R) Test Execution Command Line Tool Version 15.3.0-dev
Copyright (c) Microsoft Corporation.  All rights reserved.

Starting test execution, please wait...
NUnit Adapter 3.8.0.0: Test execution started
Running all tests in C:\code\fluentwindsor\FluentWindsor\FluentWindsor.Tests\bin\Debug\net461\FluentWindsor.Tests.dll
NUnit3TestExecutor converted 6 of 6 NUnit test cases
NUnit Adapter 3.8.0.0: Test execution complete
Failed   Then_We_Should_Be_Able_To_Register_Types_Multiple_Times_Without_Exceptions_Being_Raised
Error Message:
 System.Exception : FluentWindsor::Assembly Load Errors(If you use nuget please consolidate your versions or try installing the missing assemblies below, otherwise delete your bin/obj folders outside visual studio and then recompile and fix the missing assembly reference errors in your project) ->

System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.VisualStudio.TestPlatform.ObjectModel, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
File name: 'Microsoft.VisualStudio.TestPlatform.ObjectModel, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'

=== Pre-bind state information ===
LOG: DisplayName = Microsoft.VisualStudio.TestPlatform.ObjectModel, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
 (Fully-specified)
LOG: Appbase = file:///C:/code/fluentwindsor/FluentWindsor/FluentWindsor.Tests/bin/Debug/net461/
LOG: Initial PrivatePath = NULL
Calling assembly : NUnit3.TestAdapter, Version=3.8.0.0, Culture=neutral, PublicKeyToken=4cb40d35494691ac.
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\code\fluentwindsor\FluentWindsor\FluentWindsor.Tests\bin\Debug\net461\FluentWindsor.Tests.dll.config
LOG: Using host configuration file:
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
LOG: Post-policy reference: Microsoft.VisualStudio.TestPlatform.ObjectModel, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
LOG: Attempting download of new URL file:///C:/code/fluentwindsor/FluentWindsor/FluentWindsor.Tests/bin/Debug/net461/Microsoft.VisualStudio.TestPlatform.ObjectModel.DLL.
LOG: Attempting download of new URL file:///C:/code/fluentwindsor/FluentWindsor/FluentWindsor.Tests/bin/Debug/net461/Microsoft.VisualStudio.TestPlatform.ObjectModel/Microsoft.VisualStudio.TestPlatform.ObjectModel.DLL.
LOG: Attempting download of new URL file:///C:/code/fluentwindsor/FluentWindsor/FluentWindsor.Tests/bin/Debug/net461/Microsoft.VisualStudio.TestPlatform.ObjectModel.EXE.
LOG: Attempting download of new URL file:///C:/code/fluentwindsor/FluentWindsor/FluentWindsor.Tests/bin/Debug/net461/Microsoft.VisualStudio.TestPlatform.ObjectModel/Microsoft.VisualStudio.TestPlatform.ObjectModel.EXE.
,System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.VisualStudio.TestPlatform.ObjectModel, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
File name: 'Microsoft.VisualStudio.TestPlatform.ObjectModel, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'

=== Pre-bind state information ===
LOG: DisplayName = Microsoft.VisualStudio.TestPlatform.ObjectModel, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
 (Fully-specified)
LOG: Appbase = file:///C:/code/fluentwindsor/FluentWindsor/FluentWindsor.Tests/bin/Debug/net461/
LOG: Initial PrivatePath = NULL
Calling assembly : NUnit3.TestAdapter, Version=3.8.0.0, Culture=neutral, PublicKeyToken=4cb40d35494691ac.
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\code\fluentwindsor\FluentWindsor\FluentWindsor.Tests\bin\Debug\net461\FluentWindsor.Tests.dll.config
LOG: Using host configuration file:
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
LOG: Post-policy reference: Microsoft.VisualStudio.TestPlatform.ObjectModel, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
LOG: The same bind was seen before, and was failed with hr = 0x80070002.
,System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.VisualStudio.TestPlatform.ObjectModel, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
File name: 'Microsoft.VisualStudio.TestPlatform.ObjectModel, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'

=== Pre-bind state information ===
LOG: DisplayName = Microsoft.VisualStudio.TestPlatform.ObjectModel, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
 (Fully-specified)
LOG: Appbase = file:///C:/code/fluentwindsor/FluentWindsor/FluentWindsor.Tests/bin/Debug/net461/
LOG: Initial PrivatePath = NULL
Calling assembly : NUnit3.TestAdapter, Version=3.8.0.0, Culture=neutral, PublicKeyToken=4cb40d35494691ac.
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\code\fluentwindsor\FluentWindsor\FluentWindsor.Tests\bin\Debug\net461\FluentWindsor.Tests.dll.config
LOG: Using host configuration file:
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
LOG: Post-policy reference: Microsoft.VisualStudio.TestPlatform.ObjectModel, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
LOG: The same bind was seen before, and was failed with hr = 0x80070002.

Stack Trace:
   at FluentlyWindsor.Extensions.AssemblyExtensions.HasAnyTypeThatImplementsInterface[T](Assembly assembly, IAssemblyScanningPolicy[] policies)
   at FluentlyWindsor.FluentWindsor.<>c.<WithInstallers>b__12_0(Assembly x)
   at FluentlyWindsor.AssemblyScanner.FindAssemblies(Predicate`1 isTrueOf)
   at FluentlyWindsor.FluentWindsor.WithInstallers()
   at FluentWindsor.Tests.Given_We_Are_Fluently_Registering.SetUp() in C:\code\fluentwindsor\FluentWindsor\FluentWindsor.Tests\Given_We_Are_Fluently_Registering.cs:line 14
Failed   Then_We_Should_Be_Able_To_Resolve_ServiceA
Error Message:
 System.Exception : FluentWindsor::Assembly Load Errors(If you use nuget please consolidate your versions or try installing the missing assemblies below, otherwise delete your bin/obj folders outside visual studio and then recompile and fix the missing assembly reference errors in your project) ->

System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.VisualStudio.TestPlatform.ObjectModel, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
File name: 'Microsoft.VisualStudio.TestPlatform.ObjectModel, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'

=== Pre-bind state information ===
LOG: DisplayName = Microsoft.VisualStudio.TestPlatform.ObjectModel, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
 (Fully-specified)
LOG: Appbase = file:///C:/code/fluentwindsor/FluentWindsor/FluentWindsor.Tests/bin/Debug/net461/
LOG: Initial PrivatePath = NULL
Calling assembly : NUnit3.TestAdapter, Version=3.8.0.0, Culture=neutral, PublicKeyToken=4cb40d35494691ac.
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\code\fluentwindsor\FluentWindsor\FluentWindsor.Tests\bin\Debug\net461\FluentWindsor.Tests.dll.config
LOG: Using host configuration file:
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
LOG: Post-policy reference: Microsoft.VisualStudio.TestPlatform.ObjectModel, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
LOG: The same bind was seen before, and was failed with hr = 0x80070002.
,System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.VisualStudio.TestPlatform.ObjectModel, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
File name: 'Microsoft.VisualStudio.TestPlatform.ObjectModel, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'

=== Pre-bind state information ===
LOG: DisplayName = Microsoft.VisualStudio.TestPlatform.ObjectModel, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
 (Fully-specified)
LOG: Appbase = file:///C:/code/fluentwindsor/FluentWindsor/FluentWindsor.Tests/bin/Debug/net461/
LOG: Initial PrivatePath = NULL
Calling assembly : NUnit3.TestAdapter, Version=3.8.0.0, Culture=neutral, PublicKeyToken=4cb40d35494691ac.
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\code\fluentwindsor\FluentWindsor\FluentWindsor.Tests\bin\Debug\net461\FluentWindsor.Tests.dll.config
LOG: Using host configuration file:
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
LOG: Post-policy reference: Microsoft.VisualStudio.TestPlatform.ObjectModel, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
LOG: The same bind was seen before, and was failed with hr = 0x80070002.
,System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.VisualStudio.TestPlatform.ObjectModel, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
File name: 'Microsoft.VisualStudio.TestPlatform.ObjectModel, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'

=== Pre-bind state information ===
LOG: DisplayName = Microsoft.VisualStudio.TestPlatform.ObjectModel, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
 (Fully-specified)
LOG: Appbase = file:///C:/code/fluentwindsor/FluentWindsor/FluentWindsor.Tests/bin/Debug/net461/
LOG: Initial PrivatePath = NULL
Calling assembly : NUnit3.TestAdapter, Version=3.8.0.0, Culture=neutral, PublicKeyToken=4cb40d35494691ac.
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\code\fluentwindsor\FluentWindsor\FluentWindsor.Tests\bin\Debug\net461\FluentWindsor.Tests.dll.config
LOG: Using host configuration file:
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
LOG: Post-policy reference: Microsoft.VisualStudio.TestPlatform.ObjectModel, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
LOG: The same bind was seen before, and was failed with hr = 0x80070002.

Stack Trace:
   at FluentlyWindsor.Extensions.AssemblyExtensions.HasAnyTypeThatImplementsInterface[T](Assembly assembly, IAssemblyScanningPolicy[] policies)
   at FluentlyWindsor.FluentWindsor.<>c.<WithInstallers>b__12_0(Assembly x)
   at FluentlyWindsor.AssemblyScanner.FindAssemblies(Predicate`1 isTrueOf)
   at FluentlyWindsor.FluentWindsor.WithInstallers()
   at FluentWindsor.Tests.Given_We_Are_Fluently_Registering.SetUp() in C:\code\fluentwindsor\FluentWindsor\FluentWindsor.Tests\Given_We_Are_Fluently_Registering.cs:line 14
Failed   Then_We_Should_Be_Able_To_Resolve_ServiceB
Error Message:
 System.Exception : FluentWindsor::Assembly Load Errors(If you use nuget please consolidate your versions or try installing the missing assemblies below, otherwise delete your bin/obj folders outside visual studio and then recompile and fix the missing assembly reference errors in your project) ->

System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.VisualStudio.TestPlatform.ObjectModel, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
File name: 'Microsoft.VisualStudio.TestPlatform.ObjectModel, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'

=== Pre-bind state information ===
LOG: DisplayName = Microsoft.VisualStudio.TestPlatform.ObjectModel, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
 (Fully-specified)
LOG: Appbase = file:///C:/code/fluentwindsor/FluentWindsor/FluentWindsor.Tests/bin/Debug/net461/
LOG: Initial PrivatePath = NULL
Calling assembly : NUnit3.TestAdapter, Version=3.8.0.0, Culture=neutral, PublicKeyToken=4cb40d35494691ac.
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\code\fluentwindsor\FluentWindsor\FluentWindsor.Tests\bin\Debug\net461\FluentWindsor.Tests.dll.config
LOG: Using host configuration file:
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
LOG: Post-policy reference: Microsoft.VisualStudio.TestPlatform.ObjectModel, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
LOG: The same bind was seen before, and was failed with hr = 0x80070002.
,System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.VisualStudio.TestPlatform.ObjectModel, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
File name: 'Microsoft.VisualStudio.TestPlatform.ObjectModel, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'

=== Pre-bind state information ===
LOG: DisplayName = Microsoft.VisualStudio.TestPlatform.ObjectModel, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
 (Fully-specified)
LOG: Appbase = file:///C:/code/fluentwindsor/FluentWindsor/FluentWindsor.Tests/bin/Debug/net461/
LOG: Initial PrivatePath = NULL
Calling assembly : NUnit3.TestAdapter, Version=3.8.0.0, Culture=neutral, PublicKeyToken=4cb40d35494691ac.
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\code\fluentwindsor\FluentWindsor\FluentWindsor.Tests\bin\Debug\net461\FluentWindsor.Tests.dll.config
LOG: Using host configuration file:
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
LOG: Post-policy reference: Microsoft.VisualStudio.TestPlatform.ObjectModel, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
LOG: The same bind was seen before, and was failed with hr = 0x80070002.
,System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.VisualStudio.TestPlatform.ObjectModel, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
File name: 'Microsoft.VisualStudio.TestPlatform.ObjectModel, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'

=== Pre-bind state information ===
LOG: DisplayName = Microsoft.VisualStudio.TestPlatform.ObjectModel, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
 (Fully-specified)
LOG: Appbase = file:///C:/code/fluentwindsor/FluentWindsor/FluentWindsor.Tests/bin/Debug/net461/
LOG: Initial PrivatePath = NULL
Calling assembly : NUnit3.TestAdapter, Version=3.8.0.0, Culture=neutral, PublicKeyToken=4cb40d35494691ac.
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\code\fluentwindsor\FluentWindsor\FluentWindsor.Tests\bin\Debug\net461\FluentWindsor.Tests.dll.config
LOG: Using host configuration file:
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
LOG: Post-policy reference: Microsoft.VisualStudio.TestPlatform.ObjectModel, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
LOG: The same bind was seen before, and was failed with hr = 0x80070002.

Stack Trace:
   at FluentlyWindsor.Extensions.AssemblyExtensions.HasAnyTypeThatImplementsInterface[T](Assembly assembly, IAssemblyScanningPolicy[] policies)
   at FluentlyWindsor.FluentWindsor.<>c.<WithInstallers>b__12_0(Assembly x)
   at FluentlyWindsor.AssemblyScanner.FindAssemblies(Predicate`1 isTrueOf)
   at FluentlyWindsor.FluentWindsor.WithInstallers()
   at FluentWindsor.Tests.Given_We_Are_Fluently_Registering.SetUp() in C:\code\fluentwindsor\FluentWindsor\FluentWindsor.Tests\Given_We_Are_Fluently_Registering.cs:line 14
Failed   Then_We_Should_Be_Able_To_Resolve_ServiceC
Error Message:
 System.Exception : FluentWindsor::Assembly Load Errors(If you use nuget please consolidate your versions or try installing the missing assemblies below, otherwise delete your bin/obj folders outside visual studio and then recompile and fix the missing assembly reference errors in your project) ->

System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.VisualStudio.TestPlatform.ObjectModel, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
File name: 'Microsoft.VisualStudio.TestPlatform.ObjectModel, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'

=== Pre-bind state information ===
LOG: DisplayName = Microsoft.VisualStudio.TestPlatform.ObjectModel, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
 (Fully-specified)
LOG: Appbase = file:///C:/code/fluentwindsor/FluentWindsor/FluentWindsor.Tests/bin/Debug/net461/
LOG: Initial PrivatePath = NULL
Calling assembly : NUnit3.TestAdapter, Version=3.8.0.0, Culture=neutral, PublicKeyToken=4cb40d35494691ac.
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\code\fluentwindsor\FluentWindsor\FluentWindsor.Tests\bin\Debug\net461\FluentWindsor.Tests.dll.config
LOG: Using host configuration file:
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
LOG: Post-policy reference: Microsoft.VisualStudio.TestPlatform.ObjectModel, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
LOG: The same bind was seen before, and was failed with hr = 0x80070002.
,System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.VisualStudio.TestPlatform.ObjectModel, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
File name: 'Microsoft.VisualStudio.TestPlatform.ObjectModel, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'

=== Pre-bind state information ===
LOG: DisplayName = Microsoft.VisualStudio.TestPlatform.ObjectModel, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
 (Fully-specified)
LOG: Appbase = file:///C:/code/fluentwindsor/FluentWindsor/FluentWindsor.Tests/bin/Debug/net461/
LOG: Initial PrivatePath = NULL
Calling assembly : NUnit3.TestAdapter, Version=3.8.0.0, Culture=neutral, PublicKeyToken=4cb40d35494691ac.
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\code\fluentwindsor\FluentWindsor\FluentWindsor.Tests\bin\Debug\net461\FluentWindsor.Tests.dll.config
LOG: Using host configuration file:
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
LOG: Post-policy reference: Microsoft.VisualStudio.TestPlatform.ObjectModel, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
LOG: The same bind was seen before, and was failed with hr = 0x80070002.
,System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.VisualStudio.TestPlatform.ObjectModel, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
File name: 'Microsoft.VisualStudio.TestPlatform.ObjectModel, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'

=== Pre-bind state information ===
LOG: DisplayName = Microsoft.VisualStudio.TestPlatform.ObjectModel, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
 (Fully-specified)
LOG: Appbase = file:///C:/code/fluentwindsor/FluentWindsor/FluentWindsor.Tests/bin/Debug/net461/
LOG: Initial PrivatePath = NULL
Calling assembly : NUnit3.TestAdapter, Version=3.8.0.0, Culture=neutral, PublicKeyToken=4cb40d35494691ac.
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\code\fluentwindsor\FluentWindsor\FluentWindsor.Tests\bin\Debug\net461\FluentWindsor.Tests.dll.config
LOG: Using host configuration file:
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
LOG: Post-policy reference: Microsoft.VisualStudio.TestPlatform.ObjectModel, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
LOG: The same bind was seen before, and was failed with hr = 0x80070002.

Stack Trace:
   at FluentlyWindsor.Extensions.AssemblyExtensions.HasAnyTypeThatImplementsInterface[T](Assembly assembly, IAssemblyScanningPolicy[] policies)
   at FluentlyWindsor.FluentWindsor.<>c.<WithInstallers>b__12_0(Assembly x)
   at FluentlyWindsor.AssemblyScanner.FindAssemblies(Predicate`1 isTrueOf)
   at FluentlyWindsor.FluentWindsor.WithInstallers()
   at FluentWindsor.Tests.Given_We_Are_Fluently_Registering.SetUp() in C:\code\fluentwindsor\FluentWindsor\FluentWindsor.Tests\Given_We_Are_Fluently_Registering.cs:line 14
Failed   Then_We_Should_Be_Able_To_Discover_Assemblies_That_Has_Any_Type_That_Implements_An_Interface
Error Message:
 System.Exception : FluentWindsor::Assembly Load Errors(If you use nuget please consolidate your versions or try installing the missing assemblies below, otherwise delete your bin/obj folders outside visual studio and then recompile and fix the missing assembly reference errors in your project) ->

System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.VisualStudio.TestPlatform.ObjectModel, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
File name: 'Microsoft.VisualStudio.TestPlatform.ObjectModel, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'

=== Pre-bind state information ===
LOG: DisplayName = Microsoft.VisualStudio.TestPlatform.ObjectModel, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
 (Fully-specified)
LOG: Appbase = file:///C:/code/fluentwindsor/FluentWindsor/FluentWindsor.Tests/bin/Debug/net461/
LOG: Initial PrivatePath = NULL
Calling assembly : NUnit3.TestAdapter, Version=3.8.0.0, Culture=neutral, PublicKeyToken=4cb40d35494691ac.
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\code\fluentwindsor\FluentWindsor\FluentWindsor.Tests\bin\Debug\net461\FluentWindsor.Tests.dll.config
LOG: Using host configuration file:
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
LOG: Post-policy reference: Microsoft.VisualStudio.TestPlatform.ObjectModel, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
LOG: The same bind was seen before, and was failed with hr = 0x80070002.
,System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.VisualStudio.TestPlatform.ObjectModel, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
File name: 'Microsoft.VisualStudio.TestPlatform.ObjectModel, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'

=== Pre-bind state information ===
LOG: DisplayName = Microsoft.VisualStudio.TestPlatform.ObjectModel, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
 (Fully-specified)
LOG: Appbase = file:///C:/code/fluentwindsor/FluentWindsor/FluentWindsor.Tests/bin/Debug/net461/
LOG: Initial PrivatePath = NULL
Calling assembly : NUnit3.TestAdapter, Version=3.8.0.0, Culture=neutral, PublicKeyToken=4cb40d35494691ac.
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\code\fluentwindsor\FluentWindsor\FluentWindsor.Tests\bin\Debug\net461\FluentWindsor.Tests.dll.config
LOG: Using host configuration file:
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
LOG: Post-policy reference: Microsoft.VisualStudio.TestPlatform.ObjectModel, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
LOG: The same bind was seen before, and was failed with hr = 0x80070002.
,System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.VisualStudio.TestPlatform.ObjectModel, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
File name: 'Microsoft.VisualStudio.TestPlatform.ObjectModel, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'

=== Pre-bind state information ===
LOG: DisplayName = Microsoft.VisualStudio.TestPlatform.ObjectModel, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
 (Fully-specified)
LOG: Appbase = file:///C:/code/fluentwindsor/FluentWindsor/FluentWindsor.Tests/bin/Debug/net461/
LOG: Initial PrivatePath = NULL
Calling assembly : NUnit3.TestAdapter, Version=3.8.0.0, Culture=neutral, PublicKeyToken=4cb40d35494691ac.
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\code\fluentwindsor\FluentWindsor\FluentWindsor.Tests\bin\Debug\net461\FluentWindsor.Tests.dll.config
LOG: Using host configuration file:
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
LOG: Post-policy reference: Microsoft.VisualStudio.TestPlatform.ObjectModel, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
LOG: The same bind was seen before, and was failed with hr = 0x80070002.

Stack Trace:
   at FluentlyWindsor.Extensions.AssemblyExtensions.HasAnyTypeThatImplementsInterface[T](Assembly assembly, IAssemblyScanningPolicy[] policies)
   at FluentlyWindsor.FluentWindsor.<>c.<WithInstallers>b__12_0(Assembly x)
   at FluentlyWindsor.AssemblyScanner.FindAssemblies(Predicate`1 isTrueOf)
   at FluentlyWindsor.FluentWindsor.WithInstallers()
   at FluentWindsor.Tests.Given_We_Are_Fluently_Registering.SetUp() in C:\code\fluentwindsor\FluentWindsor\FluentWindsor.Tests\Given_We_Are_Fluently_Registering.cs:line 14
Failed   Then_We_Should_Be_Able_To_Discover_Assemblies_That_Has_Any_Type_That_Inherits_From
Error Message:
 System.Exception : FluentWindsor::Assembly Load Errors(If you use nuget please consolidate your versions or try installing the missing assemblies below, otherwise delete your bin/obj folders outside visual studio and then recompile and fix the missing assembly reference errors in your project) ->

System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.VisualStudio.TestPlatform.ObjectModel, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
File name: 'Microsoft.VisualStudio.TestPlatform.ObjectModel, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'

=== Pre-bind state information ===
LOG: DisplayName = Microsoft.VisualStudio.TestPlatform.ObjectModel, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
 (Fully-specified)
LOG: Appbase = file:///C:/code/fluentwindsor/FluentWindsor/FluentWindsor.Tests/bin/Debug/net461/
LOG: Initial PrivatePath = NULL
Calling assembly : NUnit3.TestAdapter, Version=3.8.0.0, Culture=neutral, PublicKeyToken=4cb40d35494691ac.
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\code\fluentwindsor\FluentWindsor\FluentWindsor.Tests\bin\Debug\net461\FluentWindsor.Tests.dll.config
LOG: Using host configuration file:
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
LOG: Post-policy reference: Microsoft.VisualStudio.TestPlatform.ObjectModel, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
LOG: The same bind was seen before, and was failed with hr = 0x80070002.
,System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.VisualStudio.TestPlatform.ObjectModel, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
File name: 'Microsoft.VisualStudio.TestPlatform.ObjectModel, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'

=== Pre-bind state information ===
LOG: DisplayName = Microsoft.VisualStudio.TestPlatform.ObjectModel, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
 (Fully-specified)
LOG: Appbase = file:///C:/code/fluentwindsor/FluentWindsor/FluentWindsor.Tests/bin/Debug/net461/
LOG: Initial PrivatePath = NULL
Calling assembly : NUnit3.TestAdapter, Version=3.8.0.0, Culture=neutral, PublicKeyToken=4cb40d35494691ac.
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\code\fluentwindsor\FluentWindsor\FluentWindsor.Tests\bin\Debug\net461\FluentWindsor.Tests.dll.config
LOG: Using host configuration file:
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
LOG: Post-policy reference: Microsoft.VisualStudio.TestPlatform.ObjectModel, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
LOG: The same bind was seen before, and was failed with hr = 0x80070002.
,System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.VisualStudio.TestPlatform.ObjectModel, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
File name: 'Microsoft.VisualStudio.TestPlatform.ObjectModel, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'

=== Pre-bind state information ===
LOG: DisplayName = Microsoft.VisualStudio.TestPlatform.ObjectModel, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
 (Fully-specified)
LOG: Appbase = file:///C:/code/fluentwindsor/FluentWindsor/FluentWindsor.Tests/bin/Debug/net461/
LOG: Initial PrivatePath = NULL
Calling assembly : NUnit3.TestAdapter, Version=3.8.0.0, Culture=neutral, PublicKeyToken=4cb40d35494691ac.
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\code\fluentwindsor\FluentWindsor\FluentWindsor.Tests\bin\Debug\net461\FluentWindsor.Tests.dll.config
LOG: Using host configuration file:
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
LOG: Post-policy reference: Microsoft.VisualStudio.TestPlatform.ObjectModel, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
LOG: The same bind was seen before, and was failed with hr = 0x80070002.

Stack Trace:
   at FluentlyWindsor.Extensions.AssemblyExtensions.HasAnyTypeThatImplementsInterface[T](Assembly assembly, IAssemblyScanningPolicy[] policies)
   at FluentlyWindsor.FluentWindsor.<>c.<WithInstallers>b__12_0(Assembly x)
   at FluentlyWindsor.AssemblyScanner.FindAssemblies(Predicate`1 isTrueOf)
   at FluentlyWindsor.FluentWindsor.WithInstallers()
   at FluentWindsor.Tests.Given_We_Are_Fluently_Registering.SetUp() in C:\code\fluentwindsor\FluentWindsor\FluentWindsor.Tests\Given_We_Are_Fluently_Registering.cs:line 14

Total tests: 6. Passed: 0. Failed: 6. Skipped: 0.
Test Run Failed.
Test execution time: 2.1195 Seconds
Test run for C:\code\fluentwindsor\FluentWindsor\FluentWindsor.Tests\bin\Debug\netcoreapp2.0\FluentWindsor.Tests.dll(.NETCoreApp,Version=v2.0)
Microsoft (R) Test Execution Command Line Tool Version 15.3.0-dev
Copyright (c) Microsoft Corporation.  All rights reserved.

Starting test execution, please wait...
NUnit Adapter 3.8.0.0: Test execution started
Running all tests in C:\code\fluentwindsor\FluentWindsor\FluentWindsor.Tests\bin\Debug\netcoreapp2.0\FluentWindsor.Tests.dll
NUnit3TestExecutor converted 6 of 6 NUnit test cases
NUnit Adapter 3.8.0.0: Test execution complete

Total tests: 6. Passed: 6. Failed: 0. Skipped: 0.
Test Run Successful.
Test execution time: 2.1551 Seconds

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 26 (5 by maintainers)

Most upvoted comments

I got this issue for .NET 6 and I added the Microsoft.NET.Test.Sdk to the base project and not the child project. So once I added Microsoft.NET.Test.Sdk to the child project this issue got resolved.

@blelem This wasn’t bug on vstest https://github.com/Microsoft/vstest/issues/1098#issuecomment-364358027. If your test/product code dealing with appdomains this can happens. Use fusion logs to determine what going wrong.

I get the same error with the JetBrains Rider IDE. Same project works fine with VS2017 v.15.6.3. I wonder, will this get organically fixed on Rider side whenever they update their dotnet components, or should I report the issue to JetBrains?

@fir3pho3nixx : Please reopen if the issue persists

I would try avoid this.

@OrangeTimes - Can you try something for me quick?

Please add this package and let me know if it works now:

<PackageReference Include="Microsoft.TestPlatform.ObjectModel" Version="11.0.0" />