2
votes

I 'm currently trying to make an installer for a Windows/WPF application developed in Visual Studio Community 2015 using Inno Setup 5.6.1. The application compiles without any errors in Visual Studio but for some reason it crashes when launched using the installer created with Inno Setup.

Can someone take a look at my process and let me know if I'm following the proper steps or if I'm missing something?

Here is how I created the installer.

  1. In Visual Studio I changed the compile mode from Default to Release.
  2. Compile in Release mode without any errors.
  3. In Inno Setup I created a new script using the Script Wizard, see images below.

Please note that I used the executable compiled in Release mode located in the /bin/Release/ directory.

What am I missing?

This is the error I get when I launch the app using the installer.

enter image description here

View problem details:

Problem signature:
Problem Event Name: CLR20r3
Problem Signature 01: MyApp.exe
Problem Signature 02: 0.0.0.1
Problem Signature 03: 5c1b91bb
Problem Signature 04: PresentationFramework
Problem Signature 05: 4.6.1055.0
Problem Signature 06: 563c1d45
Problem Signature 07: f9b
Problem Signature 08: 5b
Problem Signature 09: System.Windows.Markup.XamlParse
OS Version: 6.1.7601.2.1.0.256.48
Locale ID: 1033
Additional Information 1: 0a9e
Additional Information 2: 0a9e372d3b4ad19135b953a78882e789
Additional Information 3: 0a9e
Additional Information 4: 0a9e372d3b4ad19135b953a78882e789

Read our privacy statement online:
http://go.microsoft.com/fwlink/?linkid=104288&clcid=0x0409

If the online privacy statement is not available, please read our privacy statement offline:
C:\Windows\system32\en-US\erofflps.txt

Inno Script Wizard:

enter image description here enter image description here enter image description here enter image description here enter image description here enter image description here enter image description here enter image description here enter image description here

1
The problem is unlikely caused by the packaging script of Inno-Setup. First find out the error message for the crash in Event Viewer. Or click View Problem Details in the first image.kennyzx
See my edited comment, I'm now showing the View problem details.fs_tigre
Have you copied all the necessary files to the destination folder? First check if you can run the application from bin\Release without a problem, then compare the files in bin\Release with the files in C:\Program Files\MyApp.kennyzx
Application runs fine from bin\Release. Compared folders, bin\Release contains a lot of .dll files from libraries I'm using in the app (GalaSoftMvvmLight, Newtonsoft.Json) and a few folders, while the C:\Program Files\MyApp folder is completly empty. Do these two folders need to match? If yes, where in Inno Setup do I need to add the files and folders?fs_tigre

1 Answers

1
votes

The problem is that some files that are necessary to run the app are missing from the destination folder. You need to add them to the Inno-Setup package.

See the 3rd Inno-Setup screencap you provided, use the "Add File(s)" and "Add Folder" buttons.