300+ test failures with TypeLoadException: Could not load type 'System.Runtime.InteropServices.GCHandle' from assembly 'System.Runtime'
- OS X http://dotnet-ci.cloudapp.net/job/dotnet_coreclr/job/master/job/checked_osx_tst_prtest/1821/testReport/
- Ubuntu http://dotnet-ci.cloudapp.net/job/dotnet_coreclr/job/master/job/checked_ubuntu_tst_prtest/1954/testReport/
Stacktrace
MESSAGE: BEGIN EXECUTION /Users/dotnet-bot/j/workspace/dotnet_coreclr/master/checked_osx_tst_prtest/bin/tests/Windows_NT.x64.Checked/Tests/coreoverlay/corerun Pinned.exe Unhandled Exception: System.TypeLoadException: Could not load type 'System.Runtime.InteropServices.GCHandle' from assembly 'System.Runtime, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. ./Pinned.sh: line 106: 61574 Abort trap: 6 $_DebuggerFullPath "$CORE_ROOT/corerun" Pinned.exe $CLRTestExecutionArguments Expected: 100 Actual: 134 END EXECUTION - FAILED +++++++++++++++++++ STACK TRACE:
Should get fixed by https://github.com/dotnet/coreclr/pull/5154
Thanks Jan!
My removal of System.Runtime.InteropServices.Pinvoke also removed type forwards of GCHandle from System.Runtime to the PInvoke contract. GCHandle had originally been moved from InteropServices to System.Runtime, and then to the PInvoke contract.
If dotnet/runtime#16006 does not fix the problem, we should add the GCHandle type forwards back into System.Runtime.
We're still seeing fallout from this change https://github.com/dotnet/corefx/pull/8782/commits/66ce05e41958456b0f401d0a490dbc87df96695e#diff-1cf61071aa9a8e298dd7972458ec9dcdR8
Closing this issue now that the typeforwarder workaround is in place in both branches