Note that there are some explanatory texts on larger screens.

plurals
  1. POMissingMethodException in RELEASE build of setup CAB
    text
    copied!<p>I'm trying to create a setup CAB of an application for a mobile device. I can run the application via visual studio on the emulator however, when I try to manually install the cab on the emulator and run the program it immediately pops up with an Error message "An unexpected error...", clicking on details it shows me the name of the program and then "MissingMethodException" and that is all, not further information about where to look. </p> <p>I actually now have two setup projects. The original setup project which was always configured to explicitly reference the "Debug Any CPU" output which now only builds in the Debug configuration. A new setup project now explicitly references the "Relase Any CPU" output which only build in the Release configuration.</p> <p>It seems that this is only an issue in the release build, which is kind of concerning. I would prefer not to release debug versions of the code into production environments.</p> <p>After configuring the loader app, I get the following output (namespaces names changed to protected the innocent)</p> <p>This log is actually identical to the debug log up until about eight lines from the bottom of this log. </p> <p>In the debug log, after the <code>System.Data.DataSetExtensions</code> module is loaded the <code>System.Xml.Linq</code> module is loaded and then after the redirects at the end of the log a slew of additional modules are loaded starting with <code>\Windows\GAC_System.SR_v3_5_0_0_cneutral_1.dll</code> and about 80 lines of attempts to load resources and then the Forms module is loaded.</p> <p><strong>New attempt</strong></p> <p>After trying to build my own inf I still get the MissingMethodException but more detailed. It complains that it isn't able to load a specific type from one of my assemblies. </p> <p>Since I've seen the application run in release mode I decided to try copied the deployed assemblies and using those to create my cab, which did not work. I then compared the assemblies to the assemblies I was originally using to create my cab with and they are identical.</p> <p>This led me to believe that if I tried to manually run the deployed release build from the device manually I would still get the MissingMethodException, and sure enough, that is the case. In this instance though I get the <em>undetailed</em> MissingMethodException.</p> <p>To reiterate this point I have noticed that when I hit "Start Debugging" in visual studio with the Release configuration selected the program runs as excepted, however if I stop debugging and try to manually run what is deployed on the device I get the empty MissingMethodException. If I do the same thing for the debug version, that is, "Start Debugging" in Visual Studio and then stop debugging and manually run the application from the device the application runs fine.</p> <p>If anyone has any ideas on what this could be it would be much appreciated. I am so confused.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload