Closed dotriz closed 1 year ago
If it's a normal windows 10 install, you should just need the VC++ runtime. If it's one of the Windows N version, you need to install media feature pack. If it's Windows Server, then media features must be enabled in role and features manager.
You can use Event Viewer to see the error, if it crashes on launch due to missing dependencies.
Yes, its a normal Windows 10 Pro and VC++ runtime is installed too.
Make sure that if compiled for x64 you must install x64 vc++ runtime, and likewise when compiled for x86 you mist install x86 vc++ runtime. Without more info, i can't really help.
x64 VC++ runtime on a Win10 pro x64 is installed. This is the exact error I get on Windows 10 when I run Winform project from this example. WPF project doesn't give any error and doesn't open too.
See the end of this message for details on invoking just-in-time (JIT) debugging instead of this dialog box.
** Exception Text ** System.IO.FileNotFoundException: Could not load file or assembly 'ScreenRecorderLib.dll' or one of its dependencies. The specified module could not be found. File name: 'ScreenRecorderLib.dll' at TestAppWinforms.Form1.RecordButton_Click(Object sender, EventArgs e) at System.Windows.Forms.Control.OnClick(EventArgs e) at System.Windows.Forms.Button.OnClick(EventArgs e) at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent) at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.ButtonBase.WndProc(Message& m) at System.Windows.Forms.Button.WndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
----- JIT Debugging ----- To enable just-in-time (JIT) debugging, the .config file for this application or computer (machine.config) must have the jitDebugging value set in the system.windows.forms section. The application must also be compiled with debugging enabled.
For example:
When JIT debugging is enabled, any unhandled exception will be sent to the JIT debugger registered on the computer rather than be handled by this dialog box.
System.IO.FileNotFoundException: Could not load file or assembly 'ScreenRecorderLib.dll' or one of its dependencies. The specified module could not be found. File name: 'ScreenRecorderLib.dll'
This error usually means a conflict between x86 and x64 dependencies. Check that both the library and the test app is compiled for x64. And if they are compiled for x86, you need to install the vc++ x86 runtime.
Exe and dll are both compiled for x64. And see all x64 VC++ runtimes installed.
I think you are right. That was the issue. Thanks.
I we build project and take the contents of bin folder to a Windows 10 22H2 PC, executables do not run. PC has VC++ runtimes and .Netframework4.7.2 installed. What else needs to be there to make it work?