From my last post, you can see that there is a warning shown when I run the compiled .exe:
Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly 'gtk-sharp, Uersion=184.108.40.206, Culture=neutral, PublicKeyToken=35el0l95dab3c99f' or one of its dependencies.
Then some helpful text about setting a Registry flag (HKLM/Software/Microsoft/Fusion/EnableLog) to turn on assembly bind failure logging. Unfortunately, it doesn’t work — at least with Mono. To take Mono out of the equation, I followed this helpful post from Thottam R. Sriram, but got the same result.
So, in poking around, I find this page from MSFT that says that the value name should be ForceLog, NOT EnableLog. Sheesh! But when I rename the value, it still doesn’t work. Reading further on down the MSFT page, i see this:
To log bind failures to satellite assemblies
- Set the HKLM\Software\Microsoft\Fusion\LogResourceBinds registry value to 1 (the value is a DWORD).
By default, Fuslogvw.exe does not log failed attempts to locate satellite assemblies. Setting this registry key enables this feature.
Adding that DWORD value and setting it to 1 did the trick. Now I get:
Mono version 220.127.116.11 Build 0
Prepending 'C:\PROGRA~1\MONO-1~1.2\bin' to PATH
Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly 'gtk-sharp, Version=18.104.22.168, Culture=neutral, PublicKeyToken=35e10195dab3c99f' or one of its dependencies. The system cannot find the file specified. File name: 'gtk-sharp, Version=22.214.171.124, Culture=neutral, PublicKeyToken=35e10195dab3c99f' at X.Main(String args)
Assembly manager loaded from: C:\Windows\Microsoft.NET\Framework\v2.0.50727\mscorwks.dll
Running under executable C:\Users\Anthony\Documents\x.exe
--- A detailed error log follows.
=== Pre-bind state information ===
LOG: User = anthonys-m1330\Anthony
LOG: DisplayName = gtk-sharp, Version=126.96.36.199, Culture=neutral, PublicKeyToken=35e10195dab3c99f
LOG: Appbase = file:///C:/Users/Anthony/Documents/
LOG: Initial PrivatePath = NULL
Calling assembly : x, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null.
LOG: This bind starts in default load context.
LOG: No application configuration file found.
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v2.0.50727\config\machine.config.
LOG: Post-policy reference: gtk-sharp, Version=188.8.131.52, Culture=neutral, PublicKeyToken=35e10195dab3c99f
LOG: Attempting download of new URL file:///C:/Users/Anthony/Documents/gtk-sharp.DLL.
LOG: Attempting download of new URL file:///C:/Users/Anthony/Documents/gtk-sharp/gtk-sharp.DLL.
LOG: Attempting download of new URL file:///C:/Users/Anthony/Documents/gtk-sharp.EXE.
LOG: Attempting download of new URL file:///C:/Users/Anthony/Documents/gtk-sharp/gtk-sharp.EXE.