Visual Studio Online Tester Cannot Load SpecFlow

I added SpecFlow using Nuget and have a single spec (so this is a simple project). I created a VS online 2015 assembly using the web assembly editor.

Possibly a problem with the new Nuget build? I'm not sure if this is just a SpecFlow thing and I haven't had a chance to try MS Unit tests yet.

An exception occurred when invoking the executor 'executor: // mstestadapter / v1': Could not load file or assembly 'TechTalk.SpecFlow, Version = 1.9.0.77, Culture = neutral, PublicKeyToken = 0778194805d6db41' or one of its dependencies. the system cannot find the file specified.

Here's more of the stack trace:

1. 2015-08-03T21:26:27.6325511Z Executing the powershell script: C:\LR\MMS\Services\Mms\TaskAgentProvisioner\Tools\tasks\VSTest\1.0.16\VSTest.ps1
2. 2015-08-03T21:26:28.4231183Z ##[debug]Calling Invoke-VSTest for all test assemblies
3. 2015-08-03T21:26:28.4481177Z Working folder: C:\a\14076a40
4. 2015-08-03T21:26:28.4481177Z Executing C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe "C:\a\14076a40\SpecByExample\SpecByExample.Specs\bin\Debug\SpecByExample.Specs.dll" "C:\a\14076a40\SpecByExample\SpecByExample.Specs\bin\Debug\SpecByExample.Specs.dll.config" "C:\a\14076a40\SpecByExample\SpecByExample.Specs\obj\Debug\SpecByExample.Specs.dll"  /logger:trx
5. 2015-08-03T21:26:29.4654019Z Microsoft (R) Test Execution Command Line Tool Version 14.0.23107.0
6. 2015-08-03T21:26:29.4664025Z Copyright (c) Microsoft Corporation.  All rights reserved.
7. 2015-08-03T21:26:29.4664025Z Starting test execution, please wait...
8. 2015-08-03T21:26:29.7564024Z Warning: Unable to load types from the test source 'C:\a\14076a40\SpecByExample\SpecByExample.Specs\obj\Debug\SpecByExample.Specs.dll'. Some or all of the tests in this source may not be discovered. If you are running unit tests for Windows Store apps and referencing custom WinMD type then please visit http://go.microsoft.com/fwlink/?LinkId=238340 for more info. Error details: System.IO.FileNotFoundException: Could not load file or assembly 'SpecResults, Version=0.1.0.7, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.
9. 2015-08-03T21:26:29.7574029Z .
10. 2015-08-03T21:26:40.6922424Z Passed   TheUserVisitsTheWebsite
11. 2015-08-03T21:26:41.3214684Z ##[error]Error: An exception occurred while invoking executor 'executor://mstestadapter/v1': Could not load file or assembly 'TechTalk.SpecFlow, Version=1.9.0.77, Culture=neutral, PublicKeyToken=0778194805d6db41' or one of its dependencies. The system cannot find the file specified.
12. 2015-08-03T21:26:41.3224680Z ##[error]
13. 2015-08-03T21:26:41.4936886Z Results File: C:\a\14076a40\TestResults\buildguest_TASKAGENT-0007 2015-08-03 21_26_40.trx
14. 2015-08-03T21:26:41.4956876Z Total tests: 1. Passed: 1. Failed: 0. Skipped: 0.
15. 2015-08-03T21:26:41.4966881Z ##[error]Test Run Failed.
16. 2015-08-03T21:26:41.4966881Z Test execution time: 11.8787 Seconds
17. 2015-08-03T21:26:41.7581094Z ##[error]VSTest Test Run failed with exit code: 1
18. 2015-08-03T21:26:41.7741099Z Publishing Test Results...

2015-08-03T21:26:43.0372165Z Test results remaining: 1

      

UPDATE: I disabled the SpecFlow test and added a basic AboutController test (from a new MVC project file in Visual Studio). I am still getting the message "Cannot load assembly problem. SpecByExample.Web is my MVC project in my solution.

2015-08-07T16: 16: 56.7251975Z ## [error] Error message:
2015-08-07T16: 16: 56.7261978Z ## [error] Test method SpecByExample.Web.Tests.Controllers.HomeControllerTests.AboutTest exception: 2015 -08-07T16: 16: 56.7261978Z

[error] System.IO.FileNotFoundException: Could not load file or assembly "SpecByExample.Web, Version = 1.0.0.0, Culture = neutral,

PublicKeyToken = null 'or one of its dependencies. The system cannot find the file specified. WRN: Assembly binding registration is disabled.
2015-08-07T16: 16: 56.7271982Z ## [error] To enable assembly binding failures registration, set the registry value [HKLM \ Software \ Microsoft \ Fusion! EnableLog] (DWORD) at 1.
2015-08-07T16: 16: 56.7271982Z ## [error] Note. There is some performance penalty associated with the assembly binding failure logging.
2015-08-07T16: 16: 56.7281979Z ## [error] To disable this feature, delete the registry value [HKLM \ Software \ Microsoft \ Fusion! EnableLog].
2015-08-07T16: 16: 56.7281979Z ## [error] 2015-08-07T16: 16: 56.7291971Z

[error] Stack Trace: 2015-08-07T16: 16: 56.7291971Z ## [error] on SpecByExample.Web.Tests.Controllers.HomeControllerTests.AboutTest ()

2015-08-07T16: 16: 56.7831986Z Results file: C: \ a \ 14076a40 \ TestResults \ buildguest_TASKAGENT-0007 2015-08-07 16_16_56.trx 2015-08-07T16: 16: 56.7861977Z Applications:
2015-08-07T16 : 16: 56.7861977Z ## [error] Test run failed.

Here is a screenshot of my build definition: enter image description here

+3


source to share


1 answer


In the Run unit test step. follow the link and specify the path to the packages folder. (if you are using nuget it will download all dependencies there) try it and let me know how it goes.pattern with path pattern



0


source







All Articles