locked
My WPF app exe is created, but doesn't do anything when running. RRS feed

  • Question

  • Now this all his happening because I'm using install shield.  It works fine with my click-once web installation, but I'm required to make an MSI.  I'm using vs2013, so I'm using that install shield light.

    Now If I create a hello world wpf app with telerik controls and with install shield works ok.

    Now my complex wpf app runs like a background process. I see nothing come up.  How would I debug this?  It looks like it's got everything in the program files install directory.  There's no errors on the install or the build install.

    I posted this on WPF, but someone said I should post it here.  Now I've added all the same references as in the working one vs non-working one and still the same result.  I thought it might be GD picture imaging references, but that's ok when I run it on the test program.  I mostly want to know if there is anyway to debug what's going on except for adding 1 by one stuff the the working one until it breaks.


    dan

    Friday, February 14, 2014 10:52 PM

Answers

  • Ok, figured out what went wrong.

    When it checks for an application update for click-once, the program ui is hidden, or dies, or I don't know what.  It doesn't exit.  Yeah, I probably shouldn't have this for a installshield anyway, but shouldn't I get some kind of warning instead of it just running in the background?

     if (! System.Diagnostics.Debugger.IsAttached)
                {
                    ApplicationDeployment updateCheck = ApplicationDeployment.CurrentDeployment;
                    UpdateCheckInfo info = updateCheck.CheckForDetailedUpdate();
                    if (info.UpdateAvailable)
                    {
                        updateCheck.Update();
                        MessageBox.Show("The application has been upgraded, please restart.");
                        App.Current.Shutdown();
            
                    }
                }


    dan

    • Proposed as answer by Leo (Apple) Yang Wednesday, February 19, 2014 1:15 AM
    • Marked as answer by Marvin_Guo Friday, February 21, 2014 9:45 AM
    Wednesday, February 19, 2014 12:47 AM

All replies

  • Now I'm seeing an error actually, I don't know why it didn't show up before.  But still it's hard to tell:

    Now I'm seeing an error message in my events:

    Application: MyApp.exe
    Framework Version: v4.0.30319
    Description: The process was terminated due to an unhandled exception.
    Exception Info: System.IO.FileLoadException
    Stack:
       at MyApp.App..ctor()
       at MyApp.App.Main()

    then a 2nd error:
    Faulting application name: MyApp.exe, version: 1.0.1.10, time stamp: 0x52fe9f0f
    Faulting module name: KERNELBASE.dll, version: 6.3.9600.16496, time stamp: 0x52b3e015
    Exception code: 0xe0434352
    Fault offset: 0x00012eec
    Faulting process id: 0x8dc
    Faulting application start time: 0x01cf29d9ac7b2fb6
    Faulting application path: C:\......\MyApp.exe
    Faulting module path: C:\WINDOWS\SYSTEM32\KERNELBASE.dll
    Report Id: ea3472a4-95cc-11e3-be8c-d43d7ebf3818
    Faulting package full name: 
    Faulting package-relative application ID: 


    dan

    Friday, February 14, 2014 11:14 PM
  • Hi,

    From the exception message, I think it is root cause about why it doesn’t work when you installed it on machine. Here is my troubleshooting idea. If the application works fine on development environment, I saw this application is created by Visual Studio 2013, its target framework is .NET Framework 4.5.

    1. If you install the application on another machine, I think we should keep the same .NET Framework and same 3rd part components. I think this exception is caused by some DLLs or different framework.
    2. From your description, I know it works fine via Click Once, I think we can deploy this application via copy and paste it to client machine. It will narrow down this issue’s scope. If it works fine. Maybe this issue is caused by install shield.  Please contact install shield directly, I think they can give more precise troubleshooting. http://www.flexerasoftware.com/support/   

    Have a nice time!

    Sincerely,


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Monday, February 17, 2014 3:11 AM
  • By deploying copy and paste, you can just put it in the program files directory.

    I'm actually need to install this on a VDI  virtual desktop citrix thing.  Maybe I'll try that though.

    And to update, I now saw an error in the events log and tracing it, it's the wrong version of a Telerik DLL (It didn't happen the 1st time), so I'm going to try playing around with that.


    dan

    Monday, February 17, 2014 3:25 AM
  • I'm getting 2 errors on my loading.  They are .resources

    Telerik.Windows.Controls.resources
    *** Assembly Binder Log Entry  (2/18/2014 @ 11:36:07 AM) ***

    The operation failed.
    Bind result: hr = 0x80070002. The system cannot find the file specified.

    Assembly manager loaded from:  C:\Windows\Microsoft.NET\Framework\v4.0.30319\clr.dll
    Running under executable  C:\Program Files (x86)\MyAppVDI\MyApp Main\MyAppMain.exe
    --- A detailed error log follows. 

    === Pre-bind state information ===
    LOG: DisplayName = Telerik.Windows.Controls.resources, Version=2013.3.1316.40, Culture=en, PublicKeyToken=5803cfa389c90ce7
     (Fully-specified)
    LOG: Appbase = file:///C:/Program Files (x86)/MyAppVDI/MyApp Main/
    LOG: Initial PrivatePath = NULL
    LOG: Dynamic Base = NULL
    LOG: Cache Base = NULL
    LOG: AppName = MyAppMain.exe
    Calling assembly : Telerik.Windows.Controls, Version=2013.3.1316.40, Culture=neutral, PublicKeyToken=5803cfa389c90ce7.
    ===
    LOG: This bind starts in default load context.
    LOG: Using application configuration file: C:\Program Files (x86)\MyAppVDI\MyApp Main\MyAppMain.exe.config
    LOG: Using host configuration file: 
    LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
    LOG: Post-policy reference: Telerik.Windows.Controls.resources, Version=2013.3.1316.40, Culture=en, PublicKeyToken=5803cfa389c90ce7
    LOG: The same bind was seen before, and was failed with hr = 0x80070002.
    ERR: Unrecoverable error occurred during pre-download check (hr = 0x80070002).


    MyAppMain.resources

    *** Assembly Binder Log Entry  (2/18/2014 @ 11:36:06 AM) ***

    The operation failed.
    Bind result: hr = 0x80070002. The system cannot find the file specified.

    Assembly manager loaded from:  C:\Windows\Microsoft.NET\Framework\v4.0.30319\clr.dll
    Running under executable  C:\Program Files (x86)\MyAppVDI\MyApp Main\MyAppMain.exe
    --- A detailed error log follows. 

    === Pre-bind state information ===
    LOG: DisplayName = MyAppMain.resources, Version=1.0.1.10, Culture=en, PublicKeyToken=05b259ab3b08f270
     (Fully-specified)
    LOG: Appbase = file:///C:/Program Files (x86)/MyAppVDI/MyApp Main/
    LOG: Initial PrivatePath = NULL
    LOG: Dynamic Base = NULL
    LOG: Cache Base = NULL
    LOG: AppName = MyAppMain.exe
    Calling assembly : MyAppMain, Version=1.0.1.10, Culture=neutral, PublicKeyToken=05b259ab3b08f270.
    ===
    LOG: This bind starts in default load context.
    LOG: Using application configuration file: C:\Program Files (x86)\MyAppVDI\MyApp Main\MyAppMain.exe.config
    LOG: Using host configuration file: 
    LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
    LOG: Post-policy reference: MyAppMain.resources, Version=1.0.1.10, Culture=en, PublicKeyToken=05b259ab3b08f270
    LOG: GAC Lookup was unsuccessful.
    LOG: Attempting download of new URL file:///C:/Program Files (x86)/MyAppVDI/MyApp Main/en/MyAppMain.resources.DLL.
    LOG: Attempting download of new URL file:///C:/Program Files (x86)/MyAppVDI/MyApp Main/en/MyAppMain.resources/MyAppMain.resources.DLL.
    LOG: Attempting download of new URL file:///C:/Program Files (x86)/MyAppVDI/MyApp Main/en/MyAppMain.resources.EXE.
    LOG: Attempting download of new URL file:///C:/Program Files (x86)/MyAppVDI/MyApp Main/en/MyAppMain.resources/MyAppMain.resources.EXE.
    LOG: All probing URLs attempted and failed.



    dan

    Tuesday, February 18, 2014 7:48 PM
  • Ok, figured out what went wrong.

    When it checks for an application update for click-once, the program ui is hidden, or dies, or I don't know what.  It doesn't exit.  Yeah, I probably shouldn't have this for a installshield anyway, but shouldn't I get some kind of warning instead of it just running in the background?

     if (! System.Diagnostics.Debugger.IsAttached)
                {
                    ApplicationDeployment updateCheck = ApplicationDeployment.CurrentDeployment;
                    UpdateCheckInfo info = updateCheck.CheckForDetailedUpdate();
                    if (info.UpdateAvailable)
                    {
                        updateCheck.Update();
                        MessageBox.Show("The application has been upgraded, please restart.");
                        App.Current.Shutdown();
            
                    }
                }


    dan

    • Proposed as answer by Leo (Apple) Yang Wednesday, February 19, 2014 1:15 AM
    • Marked as answer by Marvin_Guo Friday, February 21, 2014 9:45 AM
    Wednesday, February 19, 2014 12:47 AM