简体   繁体   中英

Could not load file or assembly DLL

I am trying to implement A DLL into an existing project. I am getting this Error:

{"Could not load file or assembly 'Aspose.Words, Version=21.12.0.0, Culture=neutral, PublicKeyToken=716fcc553a201e56' or one of its dependencies. The system cannot find the file specified.":"Aspose.Words, Version=21.12.0.0, Culture=neutral, PublicKeyToken=716fcc553a201e56"}  System.IO.FileNotFoundException

Every time it try to run the method that creates the Aspose(dll) object it goes straight to catch, with this message. But it's odd though because when i Run the exact same code with the exact same package and path, it works just fine in a new standalone program.

Any tips?

The problem seems quite straightforward, windows can't find the.dll. So probably the reference points to nowhere. Can you try to debug and see where exactly does it look for it, in what location? Then open file explorer and verify if it actually exists there.

It might look for the.Dll in project or in Global Assembly Cache. Try cleaning the cache and try again.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM