none
.NET Framework 3.5 Client Profile - Missing method System.Windows.Threading.Dispatcher.BeginInvoke(System.Delegate, System.Object[]) RRS feed

  • Question

  • My application targets the .NET Framework 3.5 client profile and my setup is configured to install this framework using the online installer, but sometimes (at 3 users out of 12000)  the application throws the following exception: 

    Method not found: 'System.Windows.Threading.DispatcherOperation System.Windows.Threading.Dispatcher.BeginInvoke(System.Delegate, System.Object[])'.

    I also receive the following warning from the Visual Studio 2010 Code Analysis tool:

    Warning 73 CA1903 : Microsoft.Portability : Member 'Settings.SearchForApplicationRelease_bgWorker(object, DoWorkEventArgs)' uses member 'Dispatcher.Invoke(Delegate, params object[])'. Because this member was introduced in .NET Framework 3.0 Service Pack 2, which was not included in the project's target framework, .NET Framework 3.5, your application may fail to run on systems without this service pack installed.

    I have tried on several systems but I am not able to reproduce this exception. 

    How can I fix it?

    Are there any chances that the users have a corrupt version of the .NET Framework?

     

    Thank you,

    Cosmin


    Cosmin Lazar
    Monday, July 11, 2011 2:38 PM

All replies

  • Hi Cosmin,

    Thanks for your post.

    Would you please let me know when did this error message occur? Is it during installing your application/installing .NET Framework, or during using the application?

    • If this issue happen when installing the application, it is a setup project issue, and I'll help move your post to the dedicated ClickOnce and Setup & Deployment Projects Forum for better support;
    • If this issue is not a setup project issue, I would like to suggest you firstly verify the install status of .NET Framework in your machine:
      The .NET Framework Client Profile installer writes registry keys when installation has finished successfully. You can test whether the .NET Framework Client Profile is installed by checking the registry keys listed in the following table.

      Registry key name

      Value

      HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\DotNetClient\v3.5

      Name: Install

      Type: DWORD

      Data: 1

      HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\DotNetClient\v3.5

      Name: SP

      Type: DWORD

      Data: 1

      HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\DotNetClient\v3.5

      Name: Version

      Type: REG_SZ

      Data:

      3.5.{build}.{revision}

      HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Internet Settings\5.0\User Agent\Post Platform

      Name: .NET Client 3.5.{build}.{revision}

      Type: REG_SZ

      Data:

    If ther are any updates, please feel free to let me know.

    Best Reards,


    Andrew Wu [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Tuesday, July 12, 2011 6:53 AM
    Moderator
  • Hi Andrew,

    Thank you for your quick reply, 

    The problem occurs in production and when the application is actually running. Maybe the user had a previous version of the NET Framework and some files from it were in use by a program, therefore maybe the Client Framework Setup encountered a file that it could not overwrite and postponed the overwrite operation until the next restart. After that, when my application was launched, it checked for the necessary NET Framework and launched - but the WindowsBase.dll (the assembly that holds the Dispatcher implementation) was from another version of the framework (maybe 3.0?).

    I've been trying to reproduce the problem all day long, but still, with no success.

    I am not able to run the netfx_setupverifier to check the installation status because the exception occurred in production and I don't have the user's contact details.

     

    Thank you,

    Cosmin


    Cosmin Lazar
    Tuesday, July 12, 2011 11:40 AM
  • Hi Cosmin,

    Thank you for post back.

    Based on the original post and your description, I think this issue might related with the install status of .NET Framework. We'll try reinstall/repair .NET Framework first.

    Can you figure out what is the version of OS in your client machine? If possible, would you please contact the customer to try the method below?

    • Since Windows Vista/Server 2008/7 will install .NET Framework by default as system components. In these systems, you'll need to go to Control Panel >> Programs and features >> Turn Windows Features on or off to repair/reinstall .NET Framework. Or ask the client to reinstall their OS;
    • In Windows XP or other OS, please update to the latest Windows Service Pack, then download and install .NET Framework 3.5 SP1 via the link below: http://download.microsoft.com/download/2/0/e/20e90413-712f-438c-988e-fdaa79a8ac3d/dotnetfx35.exe

    If you have any concerns, please feel free to let me know.

    Best Regards, 


    Andrew Wu [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.


    Wednesday, July 13, 2011 7:13 AM
    Moderator
  • This is all the information that I have from the machines where the exception occurred:

    1. Platform: Win32NT, OS Version: 6.0.6001.65536, Service Pack: Service Pack 1;
    2. Platform: Win32NT, OS Version: 6.0.6000.0, No Service Pack;
    3. Platform: Win32NT, OS Version: 5.1.2600.131072, Service Pack: Service Pack 2;
    4. Platform: Win32NT, OS Version: 6.0.6001.65536, Service Pack: Service Pack 1.

     

    In the next version of the application I will also include a list of loaded assemblies - but until then, I`m stuck with this information.

    I cannot contact my customers. I have now seen that Windows Vista and 7 requires you to navigate to control panel in order to install the NET Framework - huge problem here, can it be done automatically?

    Another inconsistency that I have found out about is:

    If you have Windows Vista (by default you have the NET Framework 3.0 installed) with NET Framework 3.5 installed you can opt to uninstall NET Framework 3.0 from Add remove Windows Components and thus breaking the NET Framework 3.5 installation (because these frameworks are installed incrementally). Of course, the NET Framework Setup Verification Utility will fail when verifying the framework but most of the production applications use the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v3.5 registry key to detect installation of the framework. --> I don't know where should I submit this inconsistency

     


    Thank you,

    Cosmin


    Cosmin Lazar

    • Edited by Cosmin Lazar Wednesday, July 13, 2011 7:33 AM I changed the text formatting
    Wednesday, July 13, 2011 7:31 AM
  • Hi Cosmin,

    This is a quick note to let you know that I am performing research on this issue and will get back to you as soon as possible. I appreciate your patience.

    Sincerely,


    Andrew Wu [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Thursday, July 14, 2011 9:29 AM
    Moderator
  • If it helps, I can send you the setup of my application (the one that also installs .NET Client Framework 3.5 if necessary) .

    Thank you,

    Cosmin


    Cosmin Lazar
    Thursday, July 14, 2011 10:08 AM
  • When I read the warning you get it looks like as you you are using a method that requires an update to the .NET framework.

    http://support.microsoft.com/kb/958483

    These fixes should also be in an update to 3.5 SP1

    http://support.microsoft.com/kb/959209

    I don't think the .NET framework is broken when they get the error, they just don't have the latest updates installed.

    Thursday, July 14, 2011 11:23 AM
    Moderator
  • Hi Cosmin,

    We have not heard from you in a couple of days. Would you mind letting me know the result of the suggestions?

    If you need further assistance, feel free to let me know. I will be more than happy to be of assistance.

    Best Regards, 


    Andrew Wu [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Monday, July 18, 2011 7:11 AM
    Moderator
  • Hi Andrew,

     

    Sorry for the late response (had a few days out).

    I still have the problem and I haven't been able to reproduce it. I am doing my best to reach the specific users where the problem occurred. 

    Best regards,

    Cosmin


    Cosmin Lazar
    Monday, July 25, 2011 3:08 PM
  • I get the same problem when .NET 3.5 sp(0)  -> NOT service pack 1 <- is installed.  All the docs state this method is good for .NET 3.0 and up but its a big lie and the .NET 3.5 sp(0) is very broken and should be deleted from existance because it has other problems as well.  It is not backward compatible with .NET 3.0.  You'll have to force users to update to .NET 3.5 sp(1).
    Tuesday, September 20, 2016 5:04 PM