New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
System.TypeLoadException: Method 'GetSelection' in type 'MS.Internal.Automation.SelectionProviderWrapper' does not have an implementation #8056
Comments
System.Windows.Automation.Peers namespace. The error is related to the method GetSelection in the MS.Internal.Automation.SelectionProviderWrapper class, which is part of the PresentationCore assembly. Check for Missing DLLs: Verify that all required DLLs are present and accessible on the target machine. The TypeLoadException can occur if there is a problem with loading the assembly or any of its dependencies. Check for Any Assembly Redirection: If your application references multiple versions of assemblies, assembly redirection might be needed in the application configuration file (app.config) to ensure the correct version of the assembly is loaded. Check for Windows Updates: Ensure that the target machine has all necessary Windows updates, as some issues related to the PresentationCore assembly might be resolved through updates. Check for Third-Party Libraries: If your application uses third-party libraries, make sure they are compatible with the .NET Framework version and do not cause conflicts with the PresentationCore assembly. Run Dependency Walker: Use a tool like Dependency Walker (depends.exe) to check for any missing or incompatible dependencies. Check for Application Settings: If the error occurs in a specific part of your application, review that code section and make sure there are no issues related to the AutomationPeer or related classes. If none of the above steps help, it might be worth looking for any known issues or updates related to the PresentationCore assembly or the .NET Framework version you are using. |
@imechZhangLY Is it possible to share a sample repro app for this? Does the app have something to do with XPS? From the provided call stack, it doesn't seem to be a side effect of the patch which is being referred. Could you please share a dump file or sample repro to investigate this further? |
@singhashish-wpf Sorry, I can't reproduce this problem now. And according to the dump file, I found the version of UIAutomationProvider.dll and UIAutomationTypes.dll is 4.8.4605.0, but the version of PresentationCore.dll is 4.8.9166.0. Could the version mismatch cuase this exception? |
@imechZhangLY Thank you for the dump details.
The implementation appears missing for the GetSelection method while initializing the AutomationPeer. This could very much be possible due to version mismatch. |
Is the version mismatch due to Windows Update? Is there any workaround to solve this problem? Like reinstalling .NET Framework? @singhashish-wpf |
Some of our users also reported this issue, any workaround so far? |
Our customers also encountered this error. Unfortunately, many users' operating systems are unable to uninstall related Windows updates. |
@lunzima Try ignore this exception in Application.DispatcherUnhandledException event. |
Useless. I suspect that some popular "PC City" Broadcom Ghost OS images have defective Windows patches integrated into them. Even some Internet cafes’ diskless systems also have this problem. |
Now, I ensure this crash is due to the version mismatch between UIAutomationTypes.dll and PresentationCore.dll. I have tried to extract UIAutomationTypes.dll, UIAutomationProvider.dll and PresentationCore.dll from the dump file. And I found the definition of I think users can fix this problem by reinstalling .NET Framework. |
Same issue. |
Description
I found the exception
System.TypeLoadException: Method 'GetSelection' in type 'MS.Internal.Automation.SelectionProviderWrapper' does not have an implementation
has a sudden increase since June 28.The target framework of my application is .NET Framework 4.7.2. And the .NET Framework on the users' machine who have this exception is 4.8 or 4.8.1.
Is the exception related to the this patch of WPF?
Reproduction Steps
The exception will occure when app starts up. But I can't reprocue this on my machine now althrough I have installed the patch.
Expected behavior
No error
Actual behavior
Error message:
Regression?
No response
Known Workarounds
No response
Impact
No response
Configuration
No response
Other information
No response
The text was updated successfully, but these errors were encountered: