.NET
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
Referenced third party DLL throws Exception on other Machines .
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Hi,
I created a lib folder in my projects folder and then with 'Add Reference' added the reference to my project. It works well for me.
But when I executed this DLL in another system it throws an Exception "Cannot load the file or..........."
Exception file attached.
Solved! Go to Solution.
Re: Referenced third party DLL throws Exception on other Machines .
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Re: Referenced third party DLL throws Exception on other Machines .
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
yes the error message says that the same, specified file could not be found. But I have added the reference for the same and it works well on my system.
My query is how can I get the file included for other machines, so that the dll executes without exception. Is there any other way? The dll also could not be registered in any system.
Thanks.
Re: Referenced third party DLL throws Exception on other Machines .
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Any dependent assemblies used by your assembly, directly or indirectly, must be in the same folder as your plugin's main assembly, or must be in the same folder where acad.exe is located.
You don't mention how you 'executed' the DLL, but you should test it using NETLOAD, in addition to any other means of loading, such as AutoCAD's Auto-loader, and by registering the assembly for demand-loading in the registry.
Re: Referenced third party DLL throws Exception on other Machines .
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
I added the external third party dll in the projects folder.
The DLL I created was loaded with NETLOAD. When it goes to command which uses the functions from the external, throws exception.
Re: Referenced third party DLL throws Exception on other Machines .
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Note in the error message it says 'Could not load file or assembly DocumentFormat.OpenXml' (bloh blah blah) or one of its dependencies
In other words, you must look at that assembly (DocumentFormat.OpenXml) and see what additional assemblies it is dependent on (e.g, what assemblies does it reference, other than the standard framework assemblies), and you must also include those dependent assemblies in your project output folder, if they are not already there.
One common cause of this problem is a dependent assembly that's installed into the Global Assembly Cache, which will not be copied to the project folder. In that case you need to ensure that any such assemblies are installed on the target system as well.
Re: Referenced third party DLL throws Exception on other Machines .
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Installed the assemblies to the target system also. It works well.
Thanks.



