异常捕获这么加 Application.ThreadException += new System.Threading.ThreadExceptionEventHandler(Application_ThreadException); AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException); Application.Run(new Form1()); 估计还是依赖的dll不全导致的, 应该先用Depends查下依赖的基础Dll还有,现场运行最好是Release版本
发布的话不要用debug,用release
居然有人用这种方法解决了 Have you tried repairing the Adobe installation?Run the System File Checker that scans the of all protected Windows 7 system files and replaces incorrect corrupted, changed/modified, or damaged versions with the correct versions if possible: Click on the Type CMD on Search Left click and Run as Administrator Type SFC /scannow 来自: Windows 7: Faulting module name: KERNELBASE.dll, version: 6.1.7601.18409, time st http://www.sevenforums.com/software/337941-faulting-module-name-kernelbase-dll-version-6-1-7601-18409-time-st.html
我觉得可能是装vs2010的时候,会把一些运行是需要的框架给装了。
这应该不是程序本身的问题,而是操作系统和安装的组件的问题
百度百科:kernetbase.dll重新安装相关的程序,就可以解决这个问题了,debug下的文件夹直接复制,是可以运行的,只要相应的dll调用都正确即可。如果是程序出错,那么错误模块提示:将会变成自定义的dll: 比如 xxxx.dll出错。这里xxxx是程序中生成的类库,编译成dll动态链接库的。
没装的话跑起来就报上面的错误。
kernetbase.dll出错,我在出错的机器上装了vs2010后就可以跑起来了。
应该还是环境问题,唉,从下午搞到现在....
kernetbase.dll出错,我在出错的机器上装了vs2010后就可以跑起来了。
应该还是环境问题,唉,从下午搞到现在....在客户机上部署开发环境是不可取的如果涉及很多动态链接库(dll)的,一般都在编译的时候,选择静态链接(就是把所有需要的dll都复制到EXE文件的目录下),这样可以保证在客户机上,不依赖于客户机的OS环境。缺点就是打包后的程序大小会大很多。
kernetbase.dll出错,我在出错的机器上装了vs2010后就可以跑起来了。
应该还是环境问题,唉,从下午搞到现在....在客户机上部署开发环境是不可取的如果涉及很多动态链接库(dll)的,一般都在编译的时候,选择静态链接(就是把所有需要的dll都复制到EXE文件的目录下),这样可以保证在客户机上,不依赖于客户机的OS环境。缺点就是打包后的程序大小会大很多。嗯,dll与exe都在一个文件夹了
Application.ThreadException += new System.Threading.ThreadExceptionEventHandler(Application_ThreadException);
AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException);
Application.Run(new Form1());
估计还是依赖的dll不全导致的,
应该先用Depends查下依赖的基础Dll还有,现场运行最好是Release版本
Have you tried repairing the Adobe installation?Run the System File Checker that scans the of all protected Windows 7 system files and replaces incorrect corrupted, changed/modified, or damaged versions with the correct versions if possible:
Click on the
Type CMD on Search
Left click and Run as Administrator
Type SFC /scannow
来自:
Windows 7: Faulting module name: KERNELBASE.dll, version: 6.1.7601.18409, time st
http://www.sevenforums.com/software/337941-faulting-module-name-kernelbase-dll-version-6-1-7601-18409-time-st.html
运行环境(系统版本,32位/64位),framework版本
说清楚
如果是静态引用,vs会自动将目标dll复制到debug文件夹下
如果是动态引用,路径中可能没有相关dll
刚刚按照各位大牛所说的方法,又重新检查了一遍,还真是漏的一个dll。
原来昨晚测试的的三台机子之前的同事刚好都手动装过依赖那个dll。
唉,怪小弟做事不够认真,坑了大伙。
在此多谢诸位了。