As a side note, I have tried commenting out
and changing the SecurityRuleSet to 2, like so:
I have also tried different combinations of getting ride of conditional compilation symbols. These are listed for Microsoft.Dynamic:
At this point I feel like I'm trying random things hoping something works. I'm sure this is an easy fix - I'm just missing it.
In case anyone is interested, this is how you can reproduce this issue:
1. Create a solution with Microsoft.Dynamic.Build and Microsoft.Scripting.Build.
2. Fix the broken references that are in their by default. Microsoft.Scripting should only have 4.0 references, and Dynamic will have 4.0 references with a reference to Scripting.
3. Create a project that references Dynamic, and use something in there, like this: System.Linq.Expressions.Expression e = Microsoft.Scripting.Ast.Utils.Convert(
4. At this point you will be able to run this code.
5. Sign the 3 projects that are now in your solution.
6. Run the code and get this exception:
System.IO.FileLoadException was unhandled
Message=Could not load file or assembly 'Microsoft.Dynamic, Version=0.9.6.20, Culture=neutral, PublicKeyToken=2d8c82d3a1452ef1' or one of its dependencies. Strong name validation failed. (Exception from HRESULT: 0x8013141A)
FileName=Microsoft.Dynamic, Version=0.9.6.20, Culture=neutral, PublicKeyToken=2d8c82d3a1452ef1
at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String args)
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
Message=Strong name validation failed. (Exception from HRESULT: 0x8013141A)