 |
|
VB.Net รันเครื่องที่ ใช้พัฒนาได้ แต่รันเครื่อง User ไม่ได้ครับช่วยด้วยครับ |
|
 |
|
|
 |
 |
|
มี Log อย่างอื่นอีกหรือเปล่าครับ หรือไม่ลองเขียนโปรแกรมให้ใช้พวก Try แล้วดักจับ Error Message ลง Log ครับ
|
 |
 |
 |
 |
Date :
2014-09-27 09:41:50 |
By :
mr.win |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
คือคลิกเข้าโปรแกรมไม่ได้เลยครับเลยไม่รู้จะดีบักยังไง
|
 |
 |
 |
 |
Date :
2014-09-28 10:30:25 |
By :
zarooman |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ขุดรอคำตอบครับ
|
 |
 |
 |
 |
Date :
2014-09-29 09:38:21 |
By :
zarooman |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ปัญหาเกิดตอนเปิดโปรแกรมใช่ม่ะครับ ลองทำตามที่ TC Admin บอก
ขั้นตอนคือเอาโค้ดนี้ไปไว้ใน Form แรกของโปรแกรม แล้วเอาไว้ใน Form1_Load
ลองดูครับ
Code (VB.NET)
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Try
'โค้ตของโปรแกรมเรา
Catch ex As Exception
MsgBox(ex.Message)
End Try
End Sub
|
 |
 |
 |
 |
Date :
2014-10-01 01:20:44 |
By :
stbungaof |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
RIP ลองแล้วครับ เหมือนโปรแกรมจะไม่วิ่งเข้าหน้า FromLoad เลยครับ มันเออร์ขึ้นแบบข้างบนเลย
เครื่อง User ลง .Net Framework 3.5,4.0 ครบครับ
รออยู่นะครับ ช่วยที ไปหาใน MSDN,StckOverflow ผมก็อ่านไม่เข้าใจ
|
 |
 |
 |
 |
Date :
2014-10-01 09:08:59 |
By :
zarooman |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ดูใน Event Viewer มี Log ไหม๊ครับ
|
 |
 |
 |
 |
Date :
2014-10-01 09:21:08 |
By :
mr.win |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
มัน เออเรอร์ .Net ครับ ตามนี้ครับ
เครื่องผมที่ใช้พัฒนา ก็ลง .Net อยู่หลายรอบแล้วนะครับ ยังไม่หาย
General
.NET Runtime version 4.0.30319.1 - There was a failure initializing profiling API attach infrastructure. This process will not allow a profiler to attach. HRESULT: 0x80004005. Process ID (decimal): 6636. Message ID: [0x2509].
Detail
+ System
- Provider
[ Name] .NET Runtime
- EventID 1022
[ Qualifiers] 0
Level 2
Task 0
Keywords 0x80000000000000
- TimeCreated
[ SystemTime] 2014-10-01T06:27:21.000000000Z
EventRecordID 39867
Channel Application
Computer PHONG-TMN-PC
Security
- EventData
.NET Runtime version 4.0.30319.1 - There was a failure initializing profiling API attach infrastructure. This process will not allow a profiler to attach. HRESULT: 0x80004005. Process ID (decimal): 6636. Message ID: [0x2509].
|
 |
 |
 |
 |
Date :
2014-10-01 13:30:49 |
By :
zarooman |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
คอลคลิกขวาที่ Application แล้วเลือก Run as Administrator ดูครับ
|
 |
 |
 |
 |
Date :
2014-10-01 14:21:38 |
By :
mr.win |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ตอนที่ Deploy อย่าลืมเลือก Version ให้เป็นแบบ Release ด้วยครับ
|
 |
 |
 |
 |
Date :
2014-10-01 14:23:24 |
By :
mr.win |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ขึ้น error เหมือนกันเลย
http://www.vbforums.com/showthread.php?664221-RESOLVED-How-to-investigate-quot-System-InvalidOperationException-quot
|
 |
 |
 |
 |
Date :
2014-10-01 14:34:45 |
By :
fonfire |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
แก้ที่ Form ที่ startup อ่ะครับ
ดูที่ code ของไฟล์ที่เป็นไฟล์ design --> ตั้งเป็น show all files ถึงจะมองเห็น
ถ้าเข้าถูกที่ คุณจะเจอ sub ชื่อว่า Dispose
Protected Overloads Overrides Sub Dispose
ลองเพิ่มคำสั่งด้านล่างไปที่ไฟล์นี้ แล้วลอง run ดูว่าโปรแกรมแจ้งอะไรไหม
อันแรก เพิ่มคำสั่ง ไปที่ Sub New
AddHandler AppDomain.CurrentDomain.UnhandledException, AddressOf UnhandledExceptionEventRaised
จะได้ประมาณนี้
Public Sub New()
AddHandler Application.ThreadException, AddressOf OnThreadException
'Added this
AddHandler AppDomain.CurrentDomain.UnhandledException, AddressOf UnhandledExceptionEventRaised
InitializeComponent()
End Sub
ต่อมาเพิ่ม Sub ด้านล่างเข้าไปด้วย
'Added this
Sub UnhandledExceptionEventRaised(ByVal sender As Object, ByVal e As UnhandledExceptionEventArgs)
If e.IsTerminating Then
Dim o As Object = e.ExceptionObject
MessageBox.Show(o.ToString) ' use EventLog instead
End If
End Sub
จากตัวอย่าง http://www.vbforums.com/showthread.php?664221-RESOLVED-How-to-investigate-quot-System-InvalidOperationException-quot
เขาได้คำตอบว่ามีไฟล์บางตัวหายไป
System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.VisualBasic.PowerPacks.Vs, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
File name: 'Microsoft.VisualBasic.PowerPacks.Vs, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
ปล. ผมไม่เคยลองน่ะครับ
|
 |
 |
 |
 |
Date :
2014-10-01 15:22:13 |
By :
fonfire |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ไฟล์ตัวนี้ในเครื่อง นายมีหรือป่าว ครับ
tmnbill - copy.exe
ลองหาดูเพื่อได้คำตอบ
|
 |
 |
 |
 |
Date :
2014-10-07 20:22:06 |
By :
gaowteen |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ลองลงตัว Debug ดูให้มันรู้สาเหตุได้เลยหรือเปล่าครับ 
|
 |
 |
 |
 |
Date :
2014-10-08 09:22:23 |
By :
mr.win |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
เดี๋ยวผมจะอัพโหลด .exe ให้ลองกดดูนะครับ
|
 |
 |
 |
 |
Date :
2014-10-09 08:15:06 |
By :
zarooman |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
T T เป็นเหมือนกันเลยครับหาวิธีแก้ยากจัง จขกท. แก้ได้รึยังคับ ?
|
 |
 |
 |
 |
Date :
2015-04-30 15:12:59 |
By :
fangel |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
|
|