问题
I have created an application in wpf which is working fine on win7 but on Win8 it shows below exception I'm trying to open directory in explorer by passing directory path.
System.ComponentModel.Win32Exception (0x80004005): Class not registered
at System.Diagnostics.Process.StartWithShellExecuteEx(ProcessStartInfo startInfo) at System.Diagnostics.Process.Start() at System.Diagnostics.Process.Start(ProcessStartInfo startInfo) at Myapp.RunFile()
I'm also getting below error
Myapp.exe - Entry Point Not Found
The procedure entry point RangeMapFree could not be located in the dynamic link library
C:\Windows\system32\wer.dll.
is there any way to resolve above?
thanks.
回答1:
It might be that you are missing wer.dll.
I suggest you go to this link and try to install the dll :)
http://www.dll-files.com/dllindex/dll-files.shtml?wer
回答2:
For the first problem: Class not registered when executing Process.Start.
Do you start your Visual Studio environment as Administrator? (Rightclick on shortcut => Properties => Shortcut => Advanced) Some people do this to be able to use some stuff in development (like writing to the registry).
Try restarting your VS-environment as the normal user (Example: press WIN-button, type "Visual" and press Visual Studio here).
Are you able to do the Process.Start function now?
来源:https://stackoverflow.com/questions/27498523/process-start-throwing-class-not-registered-exception-in-c-sharp