简体   繁体   中英

Reference to exe in a .Net 4.6.1 project

I need to make API calls to methods in an EXE provided by a software company. In the past very old .Net version, I was able to make it work by renaming the exe to dll (I guess?). This time around the EXE they have provided seems to have been compiled in 4.6.1. I am not able to make it work and it causes runtime errors: "Could not load file or assembly... A strongly-named assembly is required"

What are my options? Is it still possible to make API calls to an EXE whether or not I rename it to a DLL? Or Should I ask them to provide me a proper DLL?

Thank you.

Thanks to @vasily.sib and the following link, I was able to resolve this issue.

I can in fact reference any EXE assembly in the project and call methods on it. An EXE (and for that matter a DLL) can be strong named and signed by anyone, and not just by the developer who has the source code for that EXE. See the following link for details.

Thank you.

https://chrisbenard.net/2009/07/16/strong-name-an-assembly-without-source-code/

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