dll load dependency error

dll load dependency error

karl.sch1983
Advocate Advocate
634 Views
3 Replies
Message 1 of 4

dll load dependency error

karl.sch1983
Advocate
Advocate

We have a dll which loads fine on 199 of the 200 workstations. One workstation gets the following error

 

Command: NETLOAD Cannot load assembly. Error details: System.IO.FileLoadException: Could not load file or assembly 'file:///L:\LISP\Check.dll' or one of its dependencies. The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG))
File name: 'file:///L:\LISP\Check.dll' ---> System.ArgumentException: The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG))
   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)
   at Autodesk.AutoCAD.Runtime.ExtensionLoader.Load(String fileName)
   at loadmgd()

 

The configuration is exactly same on all machines:

Windows 10 64 bit OS

AutoCAD 2018

dll built with VS 2017 Community Edition

 

Like I said we have flawless netload on all machines except one. I reduced the dll down to bare bones (Check.dll) to print only a "Hello world" message to command prompt, in case there was something wrong with user code. But it still won't load. Any help is very much appreciated. 

0 Likes
635 Views
3 Replies
Replies (3)
Message 2 of 4

karl.sch1983
Advocate
Advocate
Update: Checked this link from Microsoft https://stackoverflow.com/questions/14871449/exception-from-hresult-0x80070057-e-invalidarg in case the network drive was causing issues. So copied the dll to C drive and NETLOAD, still the exact same error
0 Likes
Message 3 of 4

Alexander.Rivilis
Mentor
Mentor

Check dll file is unblock: https://thirtysix.zendesk.com/hc/en-us/articles/202921675-How-to-Unblock-a-File-Downloaded-from-an-E...

Відповідь корисна? Клікніть на "ВПОДОБАЙКУ" цім повідомленням! | Do you find the posts helpful? "LIKE" these posts!
Находите сообщения полезными? Поставьте "НРАВИТСЯ" этим сообщениям!
На ваше запитання відповіли? Натисніть кнопку "ПРИЙНЯТИ РІШЕННЯ" | Have your question been answered successfully? Click "ACCEPT SOLUTION" button.
На ваш вопрос успешно ответили? Нажмите кнопку "УТВЕРДИТЬ РЕШЕНИЕ"


Alexander Rivilis / Александр Ривилис / Олександр Рівіліс
Programmer & Teacher & Helper / Программист - Учитель - Помощник / Програміст - вчитель - помічник
Facebook | Twitter | LinkedIn
Expert Elite Member

Message 4 of 4

karl.sch1983
Advocate
Advocate

We created the file in house so it wasn't downloaded from the internet and was working on all machines. The problem was with the AutoCAD shortcut. Apparently under windows 10 checking the box "Run this program as an administrator" was blocking the access to a network drive. Once that was unchecked the dll loaded fine and the error was gone. Thanks all for your help.

0 Likes