title: Failed to load file or assembly SpecFlow.Assist.Dynamic when running tests
body: <p>I have a CodedUI Test project in Visual Studio 2013. After following instructions for integrating SpecFlow with the CodedUI API, I'm getting the following error in the <code>FeatureSetup</code> (Assembly binding logging was turned on)</p>
  
  <blockquote>
    <p>Test Name:  TheWelcomeScreen</p>
    
    <p>Test FullName:  (...)Feature.TheWelcomeScreen</p>
    
    <p>Test Source:  c:\path\to\My.feature : line 6</p>
    
    <p>Test Outcome: Failed</p>
    
    <p>Test Duration:  0:00:00</p>
    
    <p>Result Message: 
    Class Initialization method (...)Feature.FeatureSetup threw exception. System.IO.FileNotFoundException: System.IO.FileNotFoundException: Could not load file or assembly 'SpecFlow.Assist.Dynamic, Version=1.0.2.0, Culture=neutral' or one of its dependencies. The system cannot find the file specified.</p>
  
  <pre><code>=== Pre-bind state information ===
  
  LOG: DisplayName = SpecFlow.Assist.Dynamic, Version=1.0.2.0, Culture=neutral
  (Partial)
  WRN: Partial binding information was supplied for an assembly:
  WRN: Assembly Name: SpecFlow.Assist.Dynamic, Version=1.0.2.0, Culture=neutral | Domain ID: 2
  WRN: A partial bind occurs when only part of the assembly display name is provided.
  WRN: This might result in the binder loading an incorrect assembly.
  WRN: It is recommended to provide a fully specified textual identity for the assembly,
  WRN: that consists of the simple name, version, culture, and public key token.
  WRN: See whitepaper http://go.microsoft.com/fwlink/?LinkId=109270 for more information and common solutions to this issue.
  LOG: Appbase = file:///C:/Path/To/Current/TestResults/Directory/Out
  LOG: Initial PrivatePath = NULLCalling assembly : TechTalk.SpecFlow, Version=1.9.0.77, Culture=neutral, PublicKeyToken=0778194805d6db41.
  ===
  LOG: This bind starts in default load context.
  LOG: Using application configuration file: C:\Path\To\Current\TestResults\Directory\Out\BWE.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: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).
  LOG: Attempting download of new URL file:///C:/Path/To/Current/TestResults/Directory/Out/SpecFlow.Assist.Dynamic.DLL.
  LOG: Attempting download of new URL file:///C:/Path/To/Current/TestResults/Directory/Out/SpecFlow.Assist.Dynamic/SpecFlow.Assist.Dynamic.DLL.
  LOG: Attempting download of new URL file:///C:/Path/To/Current/TestResults/Directory/Out/SpecFlow.Assist.Dynamic.EXE.
  LOG: Attempting download of new URL file:///C:/Path/To/Current/TestResults/Directory/Out/SpecFlow.Assist.Dynamic/SpecFlow.Assist.Dynamic.EXE.
  </code></pre>
    
    <p>Result StackTrace:</p>
  
  <pre><code>at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark&amp; stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
  at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark&amp; stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
  at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark&amp; stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
  at System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark&amp; stackMark, IntPtr pPrivHostBinder, Boolean forIntrospection)
  at System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark&amp; stackMark, Boolean forIntrospection)
  at System.Reflection.Assembly.Load(String assemblyString)
  at TechTalk.SpecFlow.Infrastructure.BindingAssemblyLoader.Load(String assemblyName)
  at System.Linq.Enumerable.WhereSelectListIterator`2.MoveNext()
  at System.Collections.Generic.List`1.InsertRange(Int32 index, IEnumerable`1 collection)
  at TechTalk.SpecFlow.Infrastructure.TestRunnerFactory.Create(Assembly testAssembly)
  at TechTalk.SpecFlow.TestRunnerManager.CreateTestRunner(TestRunnerKey key)
  at TechTalk.SpecFlow.TestRunnerManager.GetTestRunner(TestRunnerKey key)
  at TechTalk.SpecFlow.TestRunnerManager.GetTestRunner(Assembly testAssembly, Boolean async)
  at TechTalk.SpecFlow.TestRunnerManager.GetTestRunner()
  at (...)Feature.FeatureSetup(TestContext testContext) in c:\path\to\My.feature.cs:line 0
  </code></pre>
  </blockquote>
  
  <p>My <code>packages.config</code> file for this solution:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;packages&gt;
    &lt;package id="AutoMapper" version="3.3.0" targetFramework="net40" /&gt;
    &lt;package id="CompareNETObjects" version="3.01.0.0" targetFramework="net40" /&gt;
    &lt;package id="ImpromptuInterface" version="6.2.2" targetFramework="net40" /&gt;
    &lt;package id="SpecFlow" version="1.9.0" targetFramework="net40" /&gt;
    &lt;package id="SpecFlow.Assist.Dynamic" version="1.0.2" targetFramework="net40" /&gt;
  &lt;/packages&gt;
  </code></pre>
  
  <p>In the "Properties" for the SpecFlow.Assist.Dynamic DLL, the <code>CopyLocal</code> setting is set to <code>true</code>. After building the solution, the <code>bin\Debug</code> folder has <code>SpecFlow.Assist.Dynamic.dll</code> in it, but the folder for the current test run in the <code>TestResults</code> folder does not contain this DLL. It does contain these DLLs:</p>
  
  <ul>
  <li>The DLL for my project</li>
  <li>AutoMapper.dll</li>
  <li>KellermanSoftware.Compare-Net-Objects.dll</li>
  <li>TechTalk.SpecFlow.dll</li>
  </ul>
  
  <p>I've opened and closed Visual Studio, uninstalled and reinstalled the NuGet package, deleted the package sources locally, cleaned, rebuilt, rebooted, manually removed the <code>bin\Debug</code> folder and rebuilt... The list goes on. I'm still getting the same exception.</p>