0

I'm trying to create exe/msi for my solution

it contains the following Projects

Projects List

  1. ActiveDirectoryEngine: library used to implement AD operations
  2. ADService: windows service - performs the work in the background
  3. CryptographyEngine: library used to encrypt/decrypt data
  4. TerranovaActiveDirectoryHost: Dashboars/win form to manage/check the service's status
  5. SyncToolSetup: the setup project "it only targets TerranovaActiveDirectoryHost"

Here is the contents of the Setup project:

Application Folder

User's Desktop Folder

User's Program Folder

I tried the same steps for different Solution, with ONLY one windows forms application, and it worked fine, but it looks that it doesn't work when I have more than one referenced projects.

The install and Uninstall options are not enabled

after build

Update:

all the previous projects are referenced in the Win forms project, so am I targeting the right one when creating the exe/msi?

references

4

1 回答 1

0

The only project with the Install option is the setup project. Other projects in the solution do not have install option just because there is a setup project as part of the solution.

References in a non-setup project (such as a C# build) are not automatically included in a setup project. References used to build code are not necessarily things that need installing on the target system. The setup will try to help with dependencies, but it's unreliable, and only a guide. For example, your Application Folder view contains some files that are part of the .NET Framework, and you definitely don't install them because they are installed as part of the standard .NET framework install.

The setup project must be told what needs to be installed on the target system. There are generally two ways of doing this:

  1. Selecting project output as input to the setup project. This can be rather indeterminate because it's not always obvious what files are included, or what to do if the files need installing to different locations.

  2. Add the files that you know you need one at a time by adding them in the File System view of the directory they need installing into. Typically, executables go into the Application Folder (defaults to Program Files..), data files to User's Application Data, shared files to Common Files folder, some assemblies to the GAC and so on.

于 2018-06-20T19:50:25.167 回答