简体   繁体   中英

How to link external dll with my setup exe project?

I need to create a stand alone EXE of a solution. This solution contains two projects ie:

  • A-project (set up as start)
  • B-project (A web services)

    B-project uses a external DLL which is reside on same B-project folder. Above solution runs perfectly after building it. Now i want to create a stand alone EXE . So that i can sell my product for commercial use (in my school).

To do this i have performed following points:

  • Add a new project( SETUP Project ) in the solution with test name.
  • Now add project output and choose A-project from the project drop down.
  • Then i do the same for the B-project ie Add project output and choose B-project from the project drop down.
  • Check the .net framework 4 dependencies which was fine.
  • Build it.
  • Install it.

I went to the my program files directory and run test.exe with run as administrator, and try to open the web services URL .

I got to know that web services runs perfectly but when i enter the url it returns me Request error which happens when the method written in instance class didn't execute perfectly. In my project the method written in Instance class called the externall dll .

How should i link that dll with my EXE . so that it runs perfectly fine? Should i change the path in code?

If you want to deploy one .EXE:

  • Add the dll that the Project B depend on as a Resource (right click on Add existing Item -> Select dll -> change build action to Embedded resources)
  • Do the same with Project A and Project B (ie add them to your Setup.exe as Resources)
  • Then you need to implement the solution described here

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