LoadFromContext was detected

Ever since updating to R# 6.1, when ever I debug a unit test I recieve an error message:

LoadFromContext was detected
Message: The assembly named 'JetBrains.ReSharper.TaskRunnerFramework' was loaded from 'file:///C:/Program Files (x86)/JetBrains/ReSharper/v6.1/Bin/JetBrains.ReSharper.TaskRunnerFramework.DLL' using the LoadFrom context. The use of this context can result in unexpected behavior for serialization, casting and dependency resolution. In almost all cases, it is recommended that the LoadFrom context be avoided. This can be done by installing assemblies in the Global Assembly Cache or in the ApplicationBase directory and using Assembly.Load when explicitly loading assemblies.



If I press Continue, everything seems to work perfectly fine, but the dialog is rather annoying since it pops up all the time when debugging unit tests.

This never happened with 6.0

The only thing I've tried (haven't re-installed) is delete all the _resharper folders in the directory so it would re-cache everything.
3 comments
Comment actions Permalink

Hello Phillip
     In order to avoid this message just open Debug | Exceptions and disable 'LoadFromContext' managed debugging assistant. Thank you!

Andrey Serebryansky

Senior Support Engineer

JetBrains, Inc

http://www.jetbrains.com
"Develop with pleasure!"

0
Comment actions Permalink

That worked. Not sure why I had it turned on, but also not sure why R# didn't throw errors prior to upgrading.

Thanks.

0
Comment actions Permalink

Hello Phillip
     Please note that this is actually not an error thrown by ReSharper: this is a built-in Visual Studio managed debugging assistant that detects assemblies being loaded using LoadFrom method when debugging and which is turned on by default. Since ReSharper's unit test runner can use this method to load test assemblies, a warning from this managed debugging assistant can appear when you're debugging your unit tests. Thank you!

Andrey Serebryansky

Senior Support Engineer

JetBrains, Inc

http://www.jetbrains.com
"Develop with pleasure!"

0

Please sign in to leave a comment.