0

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

  • 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 i.e. 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 classcalled 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?

Amit Pal
  • 10,604
  • 26
  • 80
  • 160

1 Answers1

1

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 (i.e add them to your Setup.exe as Resources)
  • Then you need to implement the solution described here
Community
  • 1
  • 1
MBen
  • 3,956
  • 21
  • 25