Could not load file or assembly

Could not load file or assembly

peter_harrison
Enthusiast Enthusiast
904 Views
2 Replies
Message 1 of 3

Could not load file or assembly

peter_harrison
Enthusiast
Enthusiast

AutoCAD 2025: I have just upgraded my vb .net programs to vb .net core. I have the following error when running program in AutoCAD:

 

Unable to load file or assembly "Microsoft.Office.Interop.Access, ....."

 

I never received this error with my program in AutoCAD 2024.

0 Likes
905 Views
2 Replies
Replies (2)
Message 2 of 3

ntclmain
Advocate
Advocate

Are you using the Microsoft.Office.Interop.Access from a Nuget package?

If yes, then you should manually add that reference file to Dependencies\Assemblies, change Embed interop type to Yes

That's my experience with Excel interop

Access interop may be the same.

ntclmain_0-1711722274149.png

*

Here is a topic about Embed Interop problem when using Package reference:

https://stackoverflow.com/questions/75265561/cant-seem-to-embed-interop-types-when-using-packagerefe...

Message 3 of 3

peter_harrison
Enthusiast
Enthusiast

Thanks for this suggestion. I am not using a nuget package, but I have resolved the problem by copying the reference to a AutoCAD trusted location a.nd then loading it via the registry

0 Likes