2

I have a Windows service app that installs beautfully on my localhost (Win8 64bit) and my test VM (WinServer2016). And we have installed it on various other OS's including Win 7 64bit. But when I try to install in a client's desktop (also a Win7 64bit) it fails with this very unhelpful error:

Exception occurred while initializing the installation:

System.IO.FileLoadException: could not load file or assembly [file] or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0X80131515).

Thanks to this thread:

How to enable assembly bind failure logging (Fusion) in .NET

I figured out how to get Fusion Logs from the process (from the highest ranked answer... adding values to registry). And I really thought I was going to get to the bottom of why this install was failing. But, that doesn't seem to be the case. After trying the install again (and it failed again), I checked the logs.

This is what I have:

C:\FusionLog\Default\InstallUtil.exe

enter image description here

And in

C:\FusionLog\NativeImage\InstallUtil.exe

enter image description here

I have opened every single one of the files, and I've searched in NotePad++ for failed and fail... nothing.

Every. Single. File. starts with The operation was successful.

(deep sigh) I have been working on this for hours, and I'm no closer to a solution than when I started. What I am doing wrong?

Community
  • 1
  • 1
Casey Crookston
  • 13,016
  • 24
  • 107
  • 193
  • I'm sure you might've already tried this, but have you made sure that your executable is [not blocked?](https://stackoverflow.com/questions/34400546/could-not-load-file-or-assembly-operation-is-not-supported-exception-from-hres) – cbr Apr 12 '18 at 18:46
  • @cubrr. Wow. wow. Put this as an answer, will ya? – Casey Crookston Apr 12 '18 at 18:53
  • Sure! I'm a bit 50-50 as to whether this is a duplicate, but it's definitely good to have a question which reminds that the installer itself might be failing to run. – cbr Apr 12 '18 at 18:55
  • 1
    It might be a duplicate, but I'm just thrilled to have my problem solved!! – Casey Crookston Apr 12 '18 at 18:57
  • 1
    That's awesome! This is why I come to this site :) – cbr Apr 12 '18 at 18:58

2 Answers2

1

You can try to use process monitor and get a more detailed log of what´s happening and maybe find the file that is failing (remember to filter out other processes): https://learn.microsoft.com/en-us/sysinternals/downloads/procmon

Ximo
  • 21
  • 2
1

It might be that it's not the install process which fails - it could also be that the installer itself fails to start. If you've downloaded the installer to your client's computer from online, it could be that Windows is blocking the executable. Have you tried unblocking it?

cbr
  • 12,563
  • 3
  • 38
  • 63
  • 1
    That was it!! I right-clicked on the executable, selected Properties, and sure enough, it was blocked. Clicking UnBlock did the trick. – Casey Crookston Apr 12 '18 at 18:57