locked
WPF problem with windows xp RRS feed

  • Question

  • Hi, I have developed an application in WPF using visual studio team system 2008 and windows 7.
    I have deployed and created an install file (.msi) in which I include all the references and libraries that my app needs. When I install the app in windows 7 or vista everything works great, the problem is when I install it in windows xp, the installation runs excellent but when I try to run the app a windows error appears (the one with the send or not send options).
    I have tried like 4 different patches (.net 3.5), reinstalled .net fx 3.5 sp1,  created several setup files (.msi, .exe, clickonce, stand alone setup, etc.) and nothing seems to make it work.
    So i would really appreciate if somebody could point me in the right direction, at this point I am getting exhausted hehe.
    Thanks in Advance

    Alan
    Thursday, February 4, 2010 1:51 AM

Answers

  • Now I resolved that error, it was caused by a tag in the app.config file which was autogenerated and has an error.

    <extendedProtectionPolicy policyEnforcement="Never" />

    So I just removed that tags and my app worked.
    My login window pops up but when I try to log in, surprise!! Now I am getting another exception and this is starting to annoy me, are really wpf and windows xp this incompatible?

    The exception is:

    Can not convert the string "/Images/Icons/Wait.ico" of atribute Icon into an object of 'System.Windows.Media.ImageSource' type. Image format not recognized.

    This works perfect in windows vista/7 what the heck is going on here?
    Please help!!
    • Marked as answer by alan_q Monday, February 8, 2010 4:40 PM
    Friday, February 5, 2010 12:10 AM

All replies

  • Check the Application Event Log to see if additional details were logged, including a stack trace.

    Do you have error handling in the entry point of your app?  If so, try to log the exceptions.

    What account privs are you running the app under on XP?

    You said you developed your app using VSTS2008 and Windows 7.  Is it possible you've included some call to an API that only exists in Vista upwards at the start of your app?  Something to enable glass effect in your UI, a TaskDialog, or something similar?

    Thursday, February 4, 2010 2:32 AM
  • Hello Quanta, thanks a lot for your reply. The application event log shows the following:

    Type:    Error
    Source:    .NET Runtime 2.0 Error Reporting
    Category:    None
    Event ID:    5000
    Date:        02/03/2010
    Time:        07:41:34 p.m.
    User:        Not available
    Equipo:    WinXP028
    Description:
    EventType clr20r3, P1 rightpos.exe, P2 1.0.0.0, P3 4b6a2473, P4 system.configuration, P5 2.0.0.0, P6 4889de74, P7 9d, P8 48, P9 ioibmurhynrxkw0zxkyrvfn0boyyufow, P10 NIL.

    Which is not very helpful for me, this is my first WPF app =S. Although I don't know why the source is .net 2.0 I am supposed to be using 3.5.
    About the exceptions, nothing appears here, I probably missed this one.
    And the account I am using in win xp is under admin privs, and about the APIs I am not using any fancy library or anything, i think only wpf toolkit is not included in the wpf defaults, and i even added the wpf toolkit library to my installer.
    So what do you think? Thanks in advance.
    Thursday, February 4, 2010 3:02 AM
  • .NET 3.5 is really another way of saying ".NET 2.0 base framework with the latest WPF addons".  The runtime version is still actually 2.0 (confusing, no? lol).

    Are you sure the WPF toolkit itself isn't doing something specific to Vista/7?  Can you even install/run a basic WPF Windows app on this target XP machine?

    Does your app get as far as showing any windows, or does it crash before then?  If so, is there anything specific that your app does during initialisation of it's main window, or at the entry point?

    Are you comfortable sending some sample code?
    Thursday, February 4, 2010 4:42 AM
  • .NET 3.5 is really another way of saying ".NET 2.0 base framework with the latest WPF addons".  The runtime version is still actually 2.0 (confusing, no? lol).

    Are you sure the WPF toolkit itself isn't doing something specific to Vista/7?  Can you even install/run a basic WPF Windows app on this target XP machine?

    Does your app get as far as showing any windows, or does it crash before then?  If so, is there anything specific that your app does during initialisation of it's main window, or at the entry point?

    Are you comfortable sending some sample code?
    Thursday, February 4, 2010 4:45 AM
  • Well, I'm using wpf toolkit basically for datagrids and datepickers, so I don't think this does something specific to vista/7.

    Here's the weird part, I installed and ran two sample wpf applications (basically a one window app with just one label), the first one was a normal app and the second using mvvm template ( my app is based on that model ), so when I executed the first app I though it has something to do with the mvvm template, then I ran the mvvm sample app and it worked just fine. So I'm kind of running out of options here hehe.

    I have tried to execute it in 3 computers running XP, and I get the same result, no window is shown. I doble click the shortcut or the executable file, a little bit of processing and then it crashes and shows just that Windows XP error (the one with the "send" and "not send" error report buttons). 

    I don't do anything special in the first window, it's just a login window and it doesn't even shows up =S.

    Sure I can send some code, here's my app class, like you see it's pretty simple. Please let me know what piece of code you need to look at.


    public partial class App : Application
        {
            private void OnStartup(object sender, StartupEventArgs e)
            {
                //These overrides the default culture en-us, instead gets the culture of the OS
                FrameworkElement.LanguageProperty.OverrideMetadata(typeof(FrameworkElement),
                    new FrameworkPropertyMetadata(XmlLanguage.GetLanguage(CultureInfo.CurrentCulture.IetfLanguageTag)));
               
               
                // Create the View and show it
                Views.LoginView loginView = new Views.LoginView();
                loginView.Show();
            }
        }


    Thursday, February 4, 2010 7:49 AM
  • Ok, I managed to get the exception, here it is, I'll keep researching this but if somebody knows what is this about please let me know, thanks.


    http://i45.tinypic.com/24nmcmc.jpg
    • Edited by alan_q Thursday, February 4, 2010 8:49 PM Image
    Thursday, February 4, 2010 8:41 PM
  • Now I resolved that error, it was caused by a tag in the app.config file which was autogenerated and has an error.

    <extendedProtectionPolicy policyEnforcement="Never" />

    So I just removed that tags and my app worked.
    My login window pops up but when I try to log in, surprise!! Now I am getting another exception and this is starting to annoy me, are really wpf and windows xp this incompatible?

    The exception is:

    Can not convert the string "/Images/Icons/Wait.ico" of atribute Icon into an object of 'System.Windows.Media.ImageSource' type. Image format not recognized.

    This works perfect in windows vista/7 what the heck is going on here?
    Please help!!
    • Marked as answer by alan_q Monday, February 8, 2010 4:40 PM
    Friday, February 5, 2010 12:10 AM
  • this so incredibly sucks, the issue with
    <extendedProtectionPolicy policyEnforcement="Never" />
    has been around for ages, since the very first Win7 betas (almost a year now), and there still is no fix from MS. that really annoys the heck out of me.
    Friday, February 5, 2010 12:46 PM
  • Tell me about it, I spent almost 2 days to figure out that was the problem.
    do you know why that tag conflicts with xp?
    any ideas about the exception I mentioned above? any help will be really appreciated.
    Friday, February 5, 2010 5:21 PM
  • Microsoft considers the bug closed, stating that future versions won't put the tag into there.  You might want to download the latest VS2010 and test it there, and open a new bug if it still happens.

    https://connect.microsoft.com/VisualStudio/feedback/details/472759/extendedprotectionpolicy?wa=wsignin1.0
    Friday, February 5, 2010 9:17 PM
  • having the exact same problem and i built my app using vs 2010
    Wednesday, April 28, 2010 8:30 AM
  • Hi. If sombody still having this problem, check your icon file with a tool like IcoFX. Maybe you have a 256x256 hires icon in den file. Windows XP don´t like 256x256 icons.
    Monday, September 12, 2011 9:54 PM
  • Hi. If sombody still having this problem, check your icon file with a tool like IcoFX. Maybe you have a 256x256 hires icon in den file. Windows XP don´t like 256x256 icons.
    This fixed it for me :)
    Wednesday, September 14, 2011 5:36 AM