1

I have read similar questions on SO and other forums but can't what I want. I have obfuscated my binaries using 3rd party tools, and want to use these binaries in the setup.

Visual Studio Installer lets us choose the projects we want to deploy, and creates the installer using the outputs of those projects.

WiX creates a setup using the files I want but does not have an option to install .NET framework, if it doesn't already exists.

Is there a way I can use my own assemblies in Visual Studio Installer ? Or a similar alternative ?

EDIT:

I have already packed all dependencies in the binary. I don't want the installer to find the dependencies for linking them. I just want it to install .net (if not already installed) and place the binaries in a directory.

mrid
  • 5,782
  • 5
  • 28
  • 71

2 Answers2

1

Not exactly the answer you'd hope for, but you mentioned WIX and dependency to .net framework. For that reason people write bootstrappers (i.e. a binary compiled to native win32) using something like Autoit which makes sure of the framework. All you may have to do is read registry key of corresponding framework and if required it pull down the file and install. Then execute the msi !

halfer
  • 19,824
  • 17
  • 99
  • 186
1

You can use the good old Visual Studio Setup Project (Installer Project) template.

To do so, you need to download the Microsoft Visual Studio Installer Projects depending to your VS version from one of the following links:

The project could be used to deploy anything, including your project or instead of adding Project Output you can simply right click on your setup project node in solution explorer and under Add menu, add File or Assembly.

Then all dependencies will be added automatically. You can also add other files and artifacts that you need to be installed on target machine.

enter image description here

enter image description here

Reza Aghaei
  • 120,393
  • 18
  • 203
  • 398
  • I tried that but VS cannot find the dependencies ( thanks to obfuscation ) and hence setup build fails. I have all dependencies packed, I just want the setup to install .net if not present and place the binary files there. i dont want it to start looking for dependencies – mrid Feb 24 '18 at 08:20
  • Setup installs .NET Framework as prerequisite. Adding dependencies also can be done manually. (However, for a non-obfuscated application, I tried and it added dependencies automatically.) (If for any reason it couldn't detect .NET automatically, you can add any kind of prerequisite including .NET framework manually. Take a look at [this post](https://stackoverflow.com/q/48850203/3110834) for more information on having .NET framework as prerequisite.) – Reza Aghaei Feb 24 '18 at 08:34