Visual Studio Add-in treo v?i m?t thng bo l?i "TargetInvocationException"

D?ch tiu ? D?ch tiu ?
ID c?a bi: 2923556 - Xem s?n ph?m m bi ny p d?ng vo.
Bung t?t c? | Thu g?n t?t c?

Tri?u ch?ng

Khi ch?y m?t Add-in ho?c tch h?p gi, Microsoft Visual Studio 2013 b?t ng? c th? ch?m d?t v?i m?t ngo?i l? khng ?c lo?i System.Reflection.TargetInvocationException.

Trong s? ghi s? ki?n ?ng d?ng, b?n s? th?y m?t l?i ?ng d?ng v?i vn b?n tng t? nh:

Faulting ?ng d?ng tn: devenv.exe, phin b?n: 12.0.21005.1, th?i gian ng d?u: 0x524fcb34
Faulting module tn: KERNELBASE.dll, phin b?n: 6.1.7601.18229, th?i gian ng d?u: 0x51fb10c6
M? ngo?i l?: 0xe0434352
L?i offset: 0x0000812f
Faulting qu tr?nh id: 0xe3c
Faulting ?ng d?ng th?i gian b?t ?u: 0x01cf0b21c6346ea8
Faulting ?ng d?ng ?ng d?n: C:\Program Files\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe
Faulting module ?ng d?n: C:\Windows\system32\KERNELBASE.dll

y l k?t qu? s? ki?n byan v?i NET Runtime l withtext ngu?n tng t? nh:

?ng d?ng: devenv.exe
Framework phin b?n: v4.0.30319
Tr? chi m t?: Tr?nh b? ch?m d?t do m?t ngo?i l? khng ?c.
Thng tin ngo?i l?: System.Reflection.TargetInvocationException
Ngn x?p:
t?i System.RuntimeMethodHandle.InvokeMethod (System.Object, System.Object [], System.Signature, Boolean)
t?i System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal (System.Object, [] System.Object, System.Object[])
t?i System.Delegate.DynamicInvokeImpl(System.Object[])
t?i System.Windows.Threading.ExceptionWrapper.InternalRealCall (System.Delegate, System.Object, Int32)
t?i MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen (System.Object, System.Delegate, System.Object, Int32, System.Delegate)
t?i System.Windows.Threading.DispatcherOperation.InvokeImpl()
t?i System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(System.Object)
t?i System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
t?i System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
t?i System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
t?i System.Windows.Threading.DispatcherOperation.Invoke()
t?i System.Windows.Threading.Dispatcher.ProcessQueue()
t?i System.Windows.Threading.Dispatcher.WndProcHook (IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
t?i MS.Win32.HwndWrapper.WndProc (IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
t?i MS.Win32.HwndSubclass.DispatcherCallbackOperation(System.Object)
t?i System.Windows.Threading.ExceptionWrapper.InternalRealCall (System.Delegate, System.Object, Int32)
t?i MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen (System.Object, System.Delegate, System.Object, Int32, System.Delegate)
t?i System.Windows.Threading.Dispatcher.LegacyInvokeImpl (System.Windows.Threading.DispatcherPriority, System.TimeSpan, System.Delegate, System.Object, Int32)
t?i MS.Win32.HwndSubclass.SubclassWndProc (IntPtr, Int32, IntPtr, IntPtr)

Nguyn nhn

Thisissue x?y ra b?i v? m?t m? s? thay ?i trong Visual Studio IDE vo nm 2013 v ?nh h?ng ?n ti li?u m khng ph?i l ?ng d?n h?p l? tn nh phn tch c php b?i l?p .NET System.IO.File. Visual Studio c th? nm m?t System.ArgumentException khi m? cc ti li?u m bubbled ln thng qua IDE nh TargetInvocationException.

Gi?i php

B?n c th? trnh ho?c lm vi?c xung quanh v?n ? b?ng cch ?m b?o r?ng tn ti li?u c?a b?n l h?p l? Win32 t?p ? ?t tn tin.

V?n ? ny ? ?c c? ?nh trong Visual Studio 2013 Update 2 v cc phin b?n sau ny c?a Visual Studio.

Thng tin thm

M?t v d? g?i ngn x?p c?a TargetInvocationException ?c hi?n th? d?i y. i?u ny l t? m?t t?p k?t xu?t tr?nh b? b?t trn ngo?i l? khng ?c v hi?n th? trong tr?nh g? l?i WindDdbg b?ng cch s? d?ng ti?n ch m? r?ng SOS Hi?n th? ?c qu?n l? ngo?i l? cu?c g?i ngn x?p:


CLR ngo?i l? lo?i: System.Reflection.TargetInvocationException
"Ngo?i l? ? ?c nm b?i m?c tiu c?a m?t invocation."
L?I: Bi?u t?ng t?p tin khng th? ?c t?m th?y. ci ?t chuyn bi?t s?n ? xu?t kh?u bi?u t?ng cho C:\Windows\system32\KERNELBASE.dll-
eax = 0027eb88 ebx = 00000005 ecx = 00000005 edx = 00000000 esi = 0027ec48 edi = 00000001
EIP = 7528812f esp = 0027eb88 ebp = 0027ebd8 iopl = 0 nv ln ei pl nz ac pe nc
CS = 001b ss = 0023 ds = 0023 es = gs 0023 fs = 003b = 0000 efl = 00200216
KERNELBASE!RaiseException + 0x54:
7528812f c9 ? l?i
0:000 >! loadby sos clr
0:000 >! sos.PrintException
Ngo?i l? ?i t?ng: 136eb7f8
Ngo?i l? lo?i: System.Reflection.TargetInvocationException
Tin nh?n: Ngo?i l? ? ?c nm b?i m?c tiu c?a m?t invocation.
InnerException: System.ArgumentException, s? d?ng!PrintException 136e9f10 ? xem chi ti?t.
StackTrace (t?o):
SP IP ch?c nng
00000000 00000001 mscorlib_ni!System.RuntimeMethodHandle.InvokeMethod (System.Object, System.Object [], System.Signature, Boolean) + 0x2
0033BEC8 60D99BC1 mscorlib_ni!System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal (System.Object, [] System.Object, System.Object[])+0xc1
0033BEEC 60D904B6 mscorlib_ni!System.Delegate.DynamicInvokeImpl (System.Object []) + 0x76
0033BF00 6079C5BD WindowsBase_ni!System.Windows.Threading.ExceptionWrapper.InternalRealCall (System.Delegate, System.Object, Int32) + 0xad
0033BF20 6079C49A WindowsBase_ni! MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen (System.Object, System.Delegate, System.Object, Int32, System.Delegate)+0x3a
0033BF64 6079EE4C WindowsBase_ni!System.Windows.Threading.DispatcherOperation.InvokeImpl () + 0xac
0033BF9C 6079ED88 WindowsBase_ni!System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext (System.Object) + 0x38
0033BFA4 60E14157 mscorlib_ni!System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean) + 0xa7
0033 C 010 60E14096 mscorlib_ni!System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean) + 0x16
0033 C 024 60E14051 mscorlib_ni!System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)+0x41
0033C03C 6079EC9B WindowsBase_ni!System.Windows.Threading.DispatcherOperation.Invoke () + 0x5b
0033C 074 6079B21B WindowsBase_ni!System.Windows.Threading.Dispatcher.ProcessQueue () + 0x16b
0033C0B8 6079B3DA WindowsBase_ni!System.Windows.Threading.Dispatcher.WndProcHook (IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef) + 0x5a
0033 C 104 6079C75B WindowsBase_ni! MS.Win32.HwndWrapper.WndProc (IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef) + 0x9b
0033 C 140 6079C6AB WindowsBase_ni! MS.Win32.HwndSubclass.DispatcherCallbackOperation (System.Object) + 0x6b
0033C 150 6079C 562 WindowsBase_ni!System.Windows.Threading.ExceptionWrapper.InternalRealCall (System.Delegate, System.Object, Int32) + 0x52
0033 C 170 6079C49A WindowsBase_ni! MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen (System.Object, System.Delegate, System.Object, Int32, System.Delegate)+0x3a
0033C1B4 6079AABE WindowsBase_ni!System.Windows.Threading.Dispatcher.LegacyInvokeImpl (System.Windows.Threading.DispatcherPriority, System.TimeSpan, System.Delegate, System.Object, Int32) + 0x10e
0033 C 208 6079BFF1 WindowsBase_ni! MS.Win32.HwndSubclass.SubclassWndProc (IntPtr, Int32, IntPtr, IntPtr) + 0xf1
00000000 00000001 System_Windows_Forms_ni!System.Windows.Forms.UnsafeNativeMethods+IMsoComponentManager.FPushMessageLoop (IntPtr, Int32, Int32) + 0x2
0033C4D8 5C35DFC7 System_Windows_Forms_ni!System.Windows.Forms.ComponentManagerProxy.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop (IntPtr, Int32, Int32) + 0x27
0033C4F0 5BBBF8D1 System_Windows_Forms_ni!System.Windows.Forms.Application+ThreadContext.RunMessageLoopInner (Int32, System.Windows.Forms.ApplicationContext)+0x155
0033 C 540 5BBBF742 System_Windows_Forms_ni!System.Windows.Forms.Application+ThreadContext.RunMessageLoop (Int32, System.Windows.Forms.ApplicationContext)+0x4a
0033C56C 5BB67004 System_Windows_Forms_ni!System.Windows.Forms.Application.DoEvents () + 0x18
0033 C 574 0682B972 MyAddin!Kh?i t?o () + 0x6fa

StackTraceString:<none>
HResult: 80131604

InnerException cho th?y nm ngo?i l? ban ?u:

0:000 >!PrintException 136e9f10
Ngo?i l? ?i t?ng: 136e9f10
Ngo?i l? lo?i: System.ArgumentException
Thng bo: B?t h?p php nhn v?t trong ?ng d?n.
InnerException:<none>
StackTrace (t?o):</none></none>BR / > SP IP ch?c nng
0033BA18 617FFD07 mscorlib_ni!System.IO.Path.CheckInvalidPathChars (System.String, Boolean) + 0xa68db7
0033BA28 60E05936 mscorlib_ni!System.IO.Path.GetExtension (System.String) + 0x16
0033BA40 6D60F8E7 Microsoft_VisualStudio_Shell_UI_Internal_ni!Microsoft.VisualStudio.Services.VsImageService.GetIconForFileEx (System.String, Microsoft.VisualStudio.Shell.Interop.__VSUIDATAFORMAT, Microsoft.VisualStudio.Shell.Interop.__VSIconSource ByRef) + 0x3f
0033BA64 6D60F88C Microsoft_VisualStudio_Shell_UI_Internal_ni!Microsoft.VisualStudio.Services.VsImageService.GetIconForFileEx (System.String, Microsoft.VisualStudio.Shell.Interop.__VSUIDATAFORMAT, UInt32 ByRef) + 0x14
0033BA74 16D5ABD8 Microsoft_VisualStudio_Platform_WindowManagement_ni!Microsoft.VisualStudio.Platform.WindowManagement.UtilityMethods.GetDocumentTabImage (System.String, Microsoft.VisualStudio.Shell.Interop.__TABIMAGEFLAGS ByRef) + 0x38
0033BA90 6DE8F8F6 Microsoft_VisualStudio_Platform_WindowManagement_ni!Microsoft.VisualStudio.Platform.WindowManagement.WindowFrame.UpdateDocumentIcon () + 0x131e2a

StackTraceString:<none>
HResult: 80070057

M?t r? nguyn nhn c?a i?u ny l ? c nhng vo d?u ki?m ngo?c kp trong tn ti li?u. V d? C# m? ch?ng t? ngo?i l? bn trong l nh sau:</none>
static void Main(string[] args) { string path = null; path = @"A09F9925-32BC-47E1-9DC0-1F71C64E9A6E@SAMPLE.""ADEFUSR0"""; string extension = System.IO.Path.GetExtension(path); }
M? ny s? nm System.ArgumentException c?a cu?c g?i GetExtension.

Thu?c tnh

ID c?a bi: 2923556 - L?n xem xt sau cng: 26 Thang Sau 2014 - Xem xt l?i: 2.0
p d?ng
  • Microsoft Visual Studio Premium 2013
  • Microsoft Visual Studio Professional 2013
  • Microsoft Visual Studio Ultimate 2013
T? kha:
kbmt KB2923556 KbMtvi
My d?ch
QUAN TRONG: Bai vit nay c d?ch b?ng phn mm dich thu?t cua Microsoft va co th c Cng ng Microsoft chinh sa l?i thng qua cng ngh CTF thay vi mt bin dich vin chuyn nghip. Microsoft cung c?p cc bi vi?t ?c c? bin d?ch vin v ph?n m?m d?ch thu?t th?c hi?n v c?ng ?ng ch?nh s?a l?i ? b?n c th? truy c?p vo t?t c? cc bi vi?t trong C s? Ki?n th?c c?a chng ti b?ng nhi?u ngn ng? Tuy nhin, bi vi?t do my d?ch hoc thm chi cng ng chinh sa sau khng ph?i lc no c?ng hon h?o. Cc bi vi?t ny c th? ch?a cc sai st v? t? v?ng, c php ho?c ng? php, Microsoft khng ch?u trch nhi?m v? b?t k? s? thi?u chnh xc, sai st ho?c thi?t h?i no do vi?c d?ch sai n?i dung ho?c do ho?t ?ng s? d?ng c?a khch hng gy ra.
Nh?p chu?t vo y ? xem b?n ti?ng Anh c?a bi vi?t ny: 2923556

Cung cp Phan hi

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com