Cannot Access DLLs across the Network on .NET 4.0

PROBLEM

You cannot execute a project across the network in .NET Framework 4.0. You receive an error that reads:

 

System.NotSupportedException: An attempt was made to load an assembly from a network location which would have caused the assembly to be sandboxed in previous versions of the .NET Framework.
This release of the .NET Framework does not enable CAS policy by default, so this load may be dangerous.
If this load is not intended to sandbox the assembly, please enable the loadFromRemoteSources switch. See http://go.microsoft.com/fwlink/?LinkId=155569 for more information.

SOLUTION

There was a security change introduced in .NET Framework 4.0 which by default restricts .dll access from network locations.

 

Modify the ArtOfTest.Runner.exe.config file located in the Test Studio installation folder. By default the location is:

  • C:\Program Files (x86)\Telerik\Test Studio\Bin\

 

 

Open the file ArtOfTest.Runner.exe.config with Notepad (or any text editor) and add the following lines within the configuration section:

 

  <runtime>
    <loadFromRemoteSources enabled="true"/>
  </runtime> 


It should now look like this:

 

 


 

Users with earlier versions of .NET may see this error:

 

System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
---> System.Security.SecurityException: That assembly does not allow partially trusted callers.


If you receive this error, upgrade to .NET Framework 4.0.