Re: [问题] C#编译后exe执行档无法正常执行

楼主: AmosYang (泛用人型编码器)   2017-10-28 23:24:38
※ 引述《comblue (ok棒!)》之铭言:
: 目前使用C#编译一个专案程式,透过IMerge 整合dll包成一个执行档,
: 在开发电脑(或有安装VS)上都可以正常执行,但移植到其他电脑时却会发生
: 点击程式执行档,但没有任何错误讯息像是没有动作一样...
: 不知道有没有人遇过这种问题呢?
: 因为没有任何error code,所以实在无从下手阿!!!
: 推 lightyen: 看事件检视器有没有纪录? 10/26 08:55
是的,从 eventvwr 下手是一条路
Event Viewer
* https://en.wikipedia.org/wiki/Event_Viewer
* https://technet.microsoft.com/en-us/library/cc938674.aspx
用 timestamp 把 even log 排序,或许可以从 Application Log 里挖出资讯
另一个方向
* 从 command-line 启动你的程式,然后 echo %ErrorLevel%
* 或著,再写个小程式去 Process.Start(), 抓 exit code
* 或著,
How to: Launch the Debugger Automatically
https://msdn.microsoft.com/en-us/library/a329t4ed(v=vs.100).aspx
(应该可与任何 debugger 配合使用,不限于 Visual Studio debugger )
再一个方向
Debugging Assembly Loading Failures
https://blogs.msdn.microsoft.com/suzcook/2003/05/29/debugging-assembly-loading-failures/
Fuslogvw.exe (Assembly Binding Log Viewer)
https://docs.microsoft.com/en-us/dotnet/framework/tools/fuslogvw-exe-assembly-binding-log-viewer
# 江湖一点诀,说穿不值钱 :D
作者: neo5277 (I am an agent of chaos)   2017-10-29 14:17:00

Links booklink

Contact Us: admin [ a t ] ucptt.com