locked
Differing Versions of System.Windows.Forms.dll RRS feed

  • Question

  • Hello,

    I have been writing an application which uses the webbrowser control.  It's functionality differs with different versions of the System.Windows.Forms.dll.  On machines where I have, say, v2.0.50727.832 certain functionality does not exist, however on machines where I have, say, v2.0.50727.1318 the problem disappears and the functionality that was missing on one system is available on the more 'updated' version.

    The older version of the dll exists on an XP system, the newer version is found on a Vista system.  I've run all the updates on my XP machines, but the version of the DLL remains at v2.0.50727.832!!  Aside from sticking the newer version DLL on a USB key and dragging and dropping into the GAC on each XP machine, how can I fix this problem? (And no, we're not upgrading all our systems to Vista!)

    Thanks in advance!
    Wednesday, September 26, 2007 12:27 AM

All replies

  • I'm having the same problem:

     

    XP System.Windows.Forms

     

    2.0.50727.832

     

    Does NOT include System.Windows.Forms.OpenFileDialog.SafeFileName

     

    // Assembly System.Windows.Forms, Version 2.0.0.0
    Location: C:\Users\Livingston\Desktop\System.Windows.Forms.dll
    Name: System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
    Type: Library

     

    // Module System.Windows.Forms.dll
    Version: b457e992-17a9-400c-9df0-0e987bd5a805
    Location: C:\Users\Livingston\Desktop\System.Windows.Forms.dll
    Size: 5152768 Bytes

     

     

    Vista System.Windows.Forms

     

    2.0.50727.1378

     

    Does include System.Windows.Forms.OpenFileDialog.SafeFileName

     

    // Assembly System.Windows.Forms, Version 2.0.0.0
    Location: %SystemRoot%\Microsoft.net\Framework\v2.0.50727\System.Windows.Forms.dll
    Name: System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
    Type: Library

     

    // Module System.Windows.Forms.dll
    Version: 50789849-2f7c-4ee9-838d-fa0c3c654313
    Location: %SystemRoot%\Microsoft.net\Framework\v2.0.50727\System.Windows.Forms.dll
    Size: 5251072 Bytes

     

    Apparently this new System.Windows.Forms.OpenFileDialog.SafeFileName is undocumented and unofficial.  I found it via intellisense and started using it, wasn't until I deployed the app that people started having problems.

     

    I think we just have to go without using the improvements in the Vista version.  Shame!

    Monday, October 8, 2007 8:10 PM
  • It appears the SafeFileName property was added in SP1. This is stated in the reference page in the installable Windows SDK.

    WPF's clone of the OpenFileDialog has had this property from the beginning, that is from .NET 3.0.

     

    Saturday, December 1, 2007 3:37 AM