setup.exe installer won't work with release build

1598
1
05-10-2012 05:29 AM
BrianHebert
New Contributor
Using Visual Studio 2008, ArcView 10, SP 3. When I build an installer for a stand-alone arcobjects (c# console app) MyApp.exe in Visual Studio and use the Debug build, the program runs okay after installation. If I use the Release build, I get a 'MyApp has stopped working' dialog box. Then the console outputs the following:

Unhandled Exception: System.TypeInitializationException: The type initializer for 'MyApp.Program' threw an exception. ---> System.IO.FileNotFoundException: Could not load file or assembly 'ESRI.ArcGIS.System, Version=10.0.0.0, Culture=neutral, PublicKeyToken=8fc3cc631e44ad86' or one of its dependencies. The system cannot find the file specified. File name: 'ESRI.ArcGIS.System, Version=10.0.0.0, Culture=neutral, PublicKeyToken=8fc3cc631e44ad86'  at MyApp.Program..cctor()
0 Kudos
1 Reply
BrianHebert
New Contributor
Solved the problem. Had set platform to x86 for Debug build, but not for Release.
0 Kudos