#Visual 2010
Error ดังนี้
เกิดจากการหา Assembly ไม่เจอ
Could not load file or assembly 'Gsteel.Admin, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. An attempt was made to load a program with an incorrect format.
แก้ไขโดยการเปลี่ยน Platform ดังนี้
คลิกขวาที่โปรเจค --> Properties --> ไปที่แท็บ Build --> Platform target: = X86 --> Save แล้วลองรันใหม่ดู
Error ดังนี้
เมื่อมีการ build โปรแกรมใหม่เกิดขึ้น โปรแกรมจะรัน Clean debug ตัวเดิมก่อน แล้ว Write Data ใหม่ลง debug แล้ว Run file .exe ในโฟรเดอร์ debug อีกที ปัญหานี้เกิดจากโปรแกรมไม่สามารถลบ debug ตัวเดิมออกได้ เนื่องจากโปรแกรมมองว่ามีการใช้งานอยู่ ชึ่งทำให้เกิด Error ดังนี้
Error 41 Could not copy "obj\Debug\WeinGartner.WeinCad.exe" to "bin\Debug\WeinGartner.WeinCad.exe". Exceeded retry count of 10. Failed. Error 42 Unable to copy file "obj\Debug\WeinGartner.WeinCad.exe" to "bin\Debug\WeinGartner.WeinCad.exe". The process cannot access the file 'bin\Debug\WeinGartner.WeinCad.exe' because it is being used by another process.
แนะนำแก้ไข 2 วิธี
วิธีที่ 1
- ปิดโปรแกรมก่อน
- ลบไฟล์ในโฟเดอร์ Bin หรือ obj
- เปิดโปรแกรม แล้วลอง Run อีกที
วิธีที่ 2 วิธีนี้ใช้ได้ ในการแก้ไขล่าสุดครับ
1. คลิกขวาที่โปรเจค --> Properties --> แท็บ Build --> Platform target : --> เปลี่ยนจาก X86 เป็นตัวอื่น รอสักครู่--> เปลี่ยนกลับมาเป็น X86 --> Build โปรแกรม
ERROR ดังนี้
Error 3 Failed to copy file 'D:\Application\GITIV\G.ITIV\bin\Release\app.publish\Application Files\G.ITIV_1_0_0_22\Microsoft.Office.Interop.Excel.dll.deploy' to '\\192.1.5.3\appl\ITIV\Application Files\G.ITIV_1_0_0_22\Microsoft.Office.Interop.Excel.dll.deploy'. Unable to add 'Application Files/G.ITIV_1_0_0_22/Microsoft.Office.Interop.Excel.dll.deploy' to the Web site. Unable to add file 'Application Files\G.ITIV_1_0_0_22\Microsoft.Office.Interop.Excel.dll.deploy'. There is not enough space on the disk.
เกิดจากโฟรเดอร์ที่เราจะเก็บงานเต็ม
วิธีแก้ไข
เข้าไปตาม Path: ที่เรา build ลง แล้วไปลบ Application File Version เก่าออก จะทำให้เหลือพื้นที่พอที่จะ build โปรแกรมใหม่ได้