title: AppDomain.CurrentDomain.Evidence throws SerializationException
body: <p>I got a strange error when running my test cases using ReSharper (8.2.2) with VS 2013.</p>
  
  <p>A simplified test case that demos the problem only contains two lines of code:</p>
  
  <pre><code>CallContext.LogicalSetData("mydata", new ActivityStack());
  var evidence = AppDomain.CurrentDomain.Evidence;
  </code></pre>
  
  <p>where ActivityStack is a custom type that is serializable. The second line would throw an exception when the test case is run via ReSharper:</p>
  
  <pre class="lang-none prettyprint-override"><code>System.Runtime.Serialization.SerializationException was unhandled by user code
    HResult=-2146233076
    Message=Type is not resolved for member 'CSG.Framework.Operations.ActivityStack,CSG.Framework, Version=15.2.0.0, Culture=neutral, PublicKeyToken=e7ab1d859f54b223'.
    Source=mscorlib
    StackTrace:
         at System.AppDomain.get_Evidence()
         at System.AppDomain.get_Evidence()
         at CSG.Framework.Utilities.AppDomainLauncher`1..ctor(String appDomainName) in d:\Work\Git\Framework\Src\Library\Framework\Utilities\AppDomainLauncher.cs:line 40
         at CSG.Framework.UnitTest.AppDomainLauncherTests.LaunchClassFromCallingAssembly() in d:\Work\Git\Framework\Src\Library\Framework.UnitTest\Utilities\AppDomainLauncherTests.cs:line 52
    InnerException: 
  </code></pre>
  
  <p>Even though the current AppDomain appears to have the correct path on BaseDirectory where the assembly containing the type can be found, CLR appears to be still using the ReSharper bin path to probe for the assembly according to Fusion log. The problem would go away if I copy the assembly to ReSharper bin folder, but I don't think that's the right solution. I tried to subscribe to AssemblyResolve event on current AppDomain, but the handler did not get called. </p>
  
  <p>Fusion log:</p>
  
  <pre class="lang-none prettyprint-override"><code>*** Assembly Binder Log Entry  (1/23/2015 @ 12:28:54 PM) ***
  
  The operation failed.
  Bind result: hr = 0x80070002. The system cannot find the file specified.
  
  Assembly manager loaded from:     C:\Windows\Microsoft.NET\Framework64\v4.0.30319\clr.dll
  Running under executable  C:\Program Files (x86)\JetBrains\ReSharper\v8.2.Qiwabic\Bin\JetBrains.ReSharper.TaskRunner.CLR45.x64.exe
  --- A detailed error log follows. 
  
  === Pre-bind state information ===
  LOG: DisplayName = CSG.Framework, Version=15.2.0.0, Culture=neutral, PublicKeyToken=e7ab1d859f54b223 (Fully-specified)
  LOG: Appbase = file:///C:/Program Files (x86)/JetBrains/ReSharper/v8.2.Qiwabic/Bin/
  LOG: Initial PrivatePath = NULL
  LOG: Dynamic Base = NULL
  LOG: Cache Base = NULL
  LOG: AppName = JetBrains.ReSharper.TaskRunner.CLR45.x64.exe Calling assembly : (Unknown).
  ===
  LOG: This bind starts in default load context.
  LOG: Using application configuration file: C:\Program Files (x86)\JetBrains\ReSharper\v8.2.Qiwabic\Bin\JetBrains.ReSharper.TaskRunner.CLR45.x64.exe.Config
  LOG: Using host configuration file: 
  LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\v4.0.30319\config\machine.config.
  LOG: Post-policy reference: CSG.Framework, Version=15.2.0.0, Culture=neutral, PublicKeyToken=e7ab1d859f54b223
  LOG: GAC Lookup was unsuccessful.
  LOG: Attempting download of new URL file:///C:/Program Files (x86)/JetBrains/ReSharper/v8.2.Qiwabic/Bin/CSG.Framework.DLL.
  LOG: Attempting download of new URL file:///C:/Program Files (x86)/JetBrains/ReSharper/v8.2.Qiwabic/Bin/CSG.Framework/CSG.Framework.DLL.
  LOG: Attempting download of new URL file:///C:/Program Files (x86)/JetBrains/ReSharper/v8.2.Qiwabic/Bin/CSG.Framework.EXE.
  LOG: Attempting download of new URL file:///C:/Program Files (x86)/JetBrains/ReSharper/v8.2.Qiwabic/Bin/CSG.Framework/CSG.Framework.EXE.
  LOG: All probing URLs attempted and failed.
  </code></pre>