Dec0ne/DavRelayUp

Can't Load Fody

bushdav opened this issue · 3 comments

I am currently stuck on building the solution
Current OS: Windows 11 Home
MSFT VS : 2019

Error Fody: An unhandled exception occurred:
Exception:
Could not load file or assembly 'file:///C:\Users\bamo\Downloads\DavRelayUp-master\DavRelayUp-master\packages\Fody.6.7.0\netclassictask\FodyIsolated.dll' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)
Type:
System.IO.FileLoadException
StackTrace:
at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.InternalLoadFrom(String assemblyFile, Evidence securityEvidence, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm, Boolean forIntrospection, Boolean suppressSecurityChecks, StackCrawlMark& stackMark)
at System.Reflection.Assembly.LoadFrom(String assemblyFile, Evidence securityEvidence)
at System.Activator.CreateInstanceFromInternal(String assemblyFile, String typeName, Boolean ignoreCase, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, Evidence securityInfo)
at System.AppDomain.CreateInstanceFrom(String assemblyFile, String typeName)
at System.AppDomain.CreateInstanceFromAndUnwrap(String assemblyName, String typeName)
at System.AppDomain.CreateInstanceFromAndUnwrap(String assemblyName, String typeName)
at IsolatedAssemblyLoadContext.CreateInstanceFromAndUnwrap() in C:\projects\fody\FodyCommon\IsolatedAssemblyLoadContext.cs:line 21
at Processor.ExecuteInOwnAssemblyLoadContext() in C:\projects\fody\Fody\Processor.cs:line 128
at Processor.Inner() in C:\projects\fody\Fody\Processor.cs:line 122
at Processor.Execute() in C:\projects\fody\Fody\Processor.cs:line 49
Source:
mscorlib
TargetSite:
System.Reflection.RuntimeAssembly _nLoad(System.Reflection.AssemblyName, System.String, System.Security.Policy.Evidence, System.Reflection.RuntimeAssembly, System.Threading.StackCrawlMark ByRef, IntPtr, Boolean, Boolean, Boolean)
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.
Type:
System.NotSupportedException
StackTrace: DavRelayUp

Seem like the issue is related to .NET Framework runtime, try to see https://stackoverflow.com/questions/28339116/not-allowed-to-load-assembly-from-network-location may it help you.

naweka commented

solution is pretty simple: after getting this error wait ~10 seconds and build again (now succsess)

I'm just here to say I LOL'd when I saw @naweka 's response about "wait 10 seconds and try again" because I thought it was a troll...and then that's EXACTLY what fixed my issue. Thanks :-)