appload DLL into bricscad works on some PC's but not all, how to debug?


I'm building the C# sample project provided with Bricscad V19 located at Bricsys\BricsCAD V19 en_US\API\dotNet\CsBrxMgd in visual studio 2019.

The build is successful & runs correctly when loaded into my Bricscad V17 & V19, however when i send this to my colleagues we have varying results.

Error Message: Could not load file or assembly "<PATH>" or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)

On another PC:

Error loading "<PATH>": .
<PATH> loading failed.

This lead me to Could not load file or assembly Operation is not supported. (Exception from HRESULT: 0x80131515)

We have tried "unblocking" the DLL file but still receive the same error, I've also tried loading the DLL from different locations to see if it is some sort of permissions issue or trusted locations issue.

I've also found this

which seems to suggest it could be a difference in the .net framework on each machine however we all seem to have framework 4.5.1 & I built the project with 4.5.1

How can i debug this further? and improve comparability?

asked on Stack Overflow Mar 31, 2020 by Ben

1 Answer


Just looking at the error alone, there's an Environmental variable called Path which has paths to directory's with exe's and etc. Say when you Start > Run > notepad, the OS knows the exe lives in System32 as that's a Path.

enter link description here

In order to troubleshoot you will want to do a quick tutorial on ProcessMonitor. It's a tool by Mark Russinovich (Azure CTO and previously a SysInternals tool).

Work out the path the app is expecting to find the DLL and either put it there or change the references in your code to locate it correctly.

Or simply put the dependencies it's looking in the bin folder or set Copy To Output property for the dependency to true.

answered on Stack Overflow Mar 31, 2020 by Jeremy Thompson • edited Apr 1, 2020 by Jeremy Thompson

User contributions licensed under CC BY-SA 3.0