9 instantiations of TargetException
System.Private.CoreLib (3)
Internal\Reflection\Core\Execution\MethodBaseInvoker.cs (2)
57
throw new
TargetException
(SR.RFLCT_Targ_StatMethReqTarg);
60
throw new
TargetException
(SR.Format(SR.RFLCT_Targ_ITargMismatch_WithType, declaringTypeHandle.GetRuntimeTypeInfoForRuntimeTypeHandle(), thisObject.GetType()));
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\Marshal.cs (1)
855
return new System.Reflection.
TargetException
();
System.Private.Reflection.Execution (4)
Internal\Reflection\Execution\FieldAccessors\InstanceFieldAccessor.cs (3)
26
throw new
TargetException
(SR.RFLCT_Targ_StatFldReqTarg);
57
throw new
TargetException
(SR.RFLCT_Targ_StatFldReqTarg);
83
throw new
TargetException
(SR.RFLCT_Targ_StatFldReqTarg);
Internal\Reflection\Execution\MethodInvokers\InstanceMethodInvoker.cs (1)
40
throw new
TargetException
();
System.Reflection.Context (2)
System\Reflection\Context\Virtual\VirtualPropertyInfo.PropertySetter.cs (2)
44
throw new
TargetException
(SR.Target_InstanceMethodRequiresTarget);
47
throw new
TargetException
(SR.Target_ObjectTargetMismatch);
7 references to TargetException
Microsoft.Build.Framework (1)
ExceptionHandling.cs (1)
144
|| e is
TargetException
// thrown when an attempt is made to invoke a non-static method on a null object. This may occur because the caller does not
Microsoft.Extensions.AI.Tests (1)
..\..\..\..\test\Libraries\Microsoft.Extensions.AI.Tests\Functions\AIFunctionFactoryTest.cs (1)
748
await Assert.ThrowsAsync<
TargetException
>(async () => await func.InvokeAsync());
mscorlib (1)
src\runtime\src\libraries\shims\mscorlib\ref\mscorlib.cs (1)
496
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Reflection.
TargetException
))]
netstandard (1)
netstandard.cs (1)
1464
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Reflection.
TargetException
))]
PresentationFramework (1)
System\Windows\Data\ObjectDataProvider.cs (1)
531
catch (
TargetException
te)
System.Reflection (1)
System.Reflection.cs (1)
33
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Reflection.
TargetException
))]
System.Runtime (1)
src\runtime\artifacts\obj\System.Runtime\Release\net11.0\System.Runtime.Forwards.cs (1)
516
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Reflection.
TargetException
))]