Could not load file or assembly…
When setting up FitNesse & FitSharp for a project recently, I ran into a really strange problem. I tried debugging using FitSharp´s RunnerW.exe and got the following error message:
Could not load file or assembly 'file:///C:\fitnesse\fitSharp\fit.dll' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515) File name: 'file:///c:\fitnesse\fitsharp\fit.dll' ---> 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.
One possibility to solve this, is to create Runner.exe.config with the content given on the referenced MSDN file.
Another, inho easier, solution is to just unblock the
fit.dll. To do so, open the containing directory in the Windows Explorer, do a right-click in fit.dll, go to „General“, and select „Unblock“.
Apparently windows mistrusts this from the internet downloaded DLL and blocks it.