.NET Version


Due to the use of WaitOne(Int32) this class library require .NET 2.0 SP 2.
I recently had the pleasure of dealing with some people that did not and (who knows why) would not upgrade. Below is my kludge/hack for checking version and skipping Instance Awareness if the version it too old. Feel free to make it robust etc :)
    protected sealed override void OnStartup(StartupEventArgs e)
        if (Environment.Version.Major < 2 || (Environment.Version.Major == 2 || Environment.Version.Major == 8) && Environment.Version.Revision < 3053)
            MessageBox.Show("Too Old", "Too Old");
            m_IsFirstInstance = InitializeInstance(e);
            OnStartup(e, m_IsFirstInstance);
By the way great class library, saved me some time. Thanks!
Closed May 11, 2010 at 8:09 AM by BladeWise
This is a framework-related issue, that is not solved by the proposed code.The project targets explicitly .NET 3.5+, so it is quite fair to consider the issue closed.


BladeWise wrote Mar 28, 2010 at 6:22 PM

Thanks for reporting this, I'll check it out if there is another way to address the issue (maybe using a compile switch), without giving up on the awareness.

Still, I am wondering if it is really possible to use WPF (shipping with .NET 3.0) without having at least .NET 2.0 SP2 installed. Can you confirm this, and produce a small example project?

wrote May 11, 2010 at 8:09 AM

wrote Feb 13, 2013 at 7:19 PM

wrote May 16, 2013 at 12:56 AM