1

I've created a setup (.iss file) with Inno Setup that install 4 different .net projects that are in 4 different solutions.

  • Solution 1 contains Project 1
  • Solution 2 contains Project 2
  • Solution 3 contains Project 3
  • Solution 4 contains Project 4

Using the following code:

[Files]
Source: "C:\Software\project1\bin\Release\*"; DestDir: "{app}\prj1"; Components: component1; Flags: ignoreversion;
Source: "C:\Software\project2\bin\Release\*"; DestDir: "{app}\prj2"; Components: component1; Flags: recursesubdirs ignoreversion; 
Source: "C:\Software\project3\bin\Release\*"; DestDir: "{app}\prj3"; Components: component1; Excludes: ".git"; Flags: recursesubdirs ignoreversion;
Source: "C:\Software\project4\bin\Release\*"; DestDir: "{app}\prj4"; Components: component2; Flags: ignoreversion; 

Due to the fact that Inno Setup basically just copy compiled files found in bin\Release directory to the installer executable, what i need is that before the setup is created (or compiled), compilation is fired on each project, to be sure that always updated file are taken to be stored inside the executable of the installer.

I know that is possible to fire custom commands before and after the installation is executed, but is possible to do that before the installer is compiled, for example using dotnet build command on each project?

S.Orioli
  • 443
  • 6
  • 21
  • 1
    See [Run a \[Code\] or PowerShell script in Inno Setup compiler](https://stackoverflow.com/q/48772183/850848). – Martin Prikryl May 06 '19 at 13:48
  • For Visual Studio Solutions (.sln) you can use Visual & Installer extension to compile the Inno Setup (also NSIS) installers: https://marketplace.visualstudio.com/items?itemName=unSignedsro.VisualInstaller (I am developer). – Slappy May 07 '19 at 04:03
  • @MartinPrikryl thanks, that's what i was looking for. I used a powershell script that compile projects, executed automatically using the code `#expr Exec("powershell -file compileProjects.ps1")` – S.Orioli May 07 '19 at 08:31

0 Answers0