3 types derived from TypeLoadException
System.Private.CoreLib (3)
src\runtime\src\libraries\System.Private.CoreLib\src\System\DllNotFoundException.cs (1)
15public class DllNotFoundException : TypeLoadException
src\runtime\src\libraries\System.Private.CoreLib\src\System\EntryPointNotFoundException.cs (1)
15public class EntryPointNotFoundException : TypeLoadException
src\runtime\src\libraries\System.Private.CoreLib\src\System\TypeAccessException.cs (1)
14public class TypeAccessException : TypeLoadException
41 instantiations of TypeLoadException
Aspire.Hosting.RemoteHost.Tests (8)
CodeGenerationDiagnosticBuilderTests.cs (8)
26var typeLoad = new TypeLoadException("type not found") 49var typeLoad = new TypeLoadException(); 75var inner = new TypeLoadException("nested"); 88var loader = new TypeLoadException("missing type"); 106new TypeLoadException(), 118new TypeLoadException(), 135var description = CodeGenerationDiagnosticBuilder.TryDescribeAssemblySkew(new TypeLoadException("Could not load type 'X'.")); 157new TypeLoadException("Could not load type 'X'."));
Microsoft.VisualBasic.Core (1)
Microsoft\VisualBasic\CompilerServices\ExceptionUtils.vb (1)
251Return New TypeLoadException(Description)
Mono.Cecil (1)
Mono.Cecil.Cil\Symbols.cs (1)
1058 throw new TypeLoadException ("Could not find symbol provider type " + provider_name);
MSBuild (1)
OutOfProcTaskAppDomainWrapperBase.cs (1)
154new TypeLoadException(),
System.ComponentModel.TypeConverter (1)
System\ComponentModel\Design\PropertyTabAttribute.cs (1)
134throw new TypeLoadException(SR.Format(SR.PropertyTabAttributeTypeLoadException, className));
System.Configuration.ConfigurationManager (2)
System\Configuration\TypeUtil.cs (2)
151throw new TypeLoadException(SR.Format(SR.TypeNotPublic, type.AssemblyQualifiedName)); 163throw new TypeLoadException(
System.Private.CoreLib (13)
Internal\Runtime\CompilerHelpers\ThrowHelpers.cs (1)
39throw new TypeLoadException(SR.Arg_UnavailableTypeLoadException);
Internal\Runtime\TypeLoaderExceptionHelper.cs (2)
29return new TypeLoadException(SR.Format(GetFormatString(id), typeName, moduleName), typeName); 34return new TypeLoadException(SR.Format(GetFormatString(id), typeName, moduleName, messageArg), typeName);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\Marshal.cs (1)
873return new System.TypeLoadException();
System\Reflection\Runtime\General\Helpers.cs (1)
81return new TypeLoadException(message, typeName);
System\Reflection\Runtime\General\TypeUnifier.cs (4)
122throw new TypeLoadException(SR.Format(SR.ArgumentException_InvalidArrayElementType, elementType)); 187throw new TypeLoadException(SR.Format(SR.ArgumentException_InvalidArrayElementType, elementType)); 226throw new TypeLoadException(SR.Format(SR.CannotCreateByRefOfByRef, key.ElementType)); 270throw new TypeLoadException(SR.Format(SR.CannotCreatePointerOfByRef, key.ElementType));
System\Reflection\Runtime\TypeInfos\RuntimeTypeInfo.cs (1)
507throw new TypeLoadException(SR.CannotUseByRefLikeTypeInInstantiation);
System\Reflection\TypeNameResolver.NativeAot.cs (3)
51throw new TypeLoadException(SR.Arg_TypeLoadNullStr); 147throw new TypeLoadException(assembly is null ? 237throw new TypeLoadException(SR.Format(SR.TypeLoad_ResolveNestedType,
System.Private.Reflection.Execution (1)
Internal\Reflection\Execution\ExecutionEnvironmentImplementation.MappingTables.cs (1)
138throw new TypeLoadException(SR.Format(SR.MultiDim_Of_This_Rank_Not_Supported, rank));
System.Private.TypeLoader (1)
Internal\Runtime\TypeLoader\TypeLoaderTypeSystemContext.cs (1)
135throw new TypeLoadException();
System.Reflection.MetadataLoadContext (7)
System\Reflection\TypeLoading\General\Assignability.cs (4)
259return coreTypes[CoreType.SByte] ?? throw new TypeLoadException(SR.Format(SR.CoreTypeNotFound, "System.SByte")); 262return coreTypes[CoreType.Int16] ?? throw new TypeLoadException(SR.Format(SR.CoreTypeNotFound, "System.Int16")); 265return coreTypes[CoreType.Int32] ?? throw new TypeLoadException(SR.Format(SR.CoreTypeNotFound, "System.Int32")); 268return coreTypes[CoreType.Int64] ?? throw new TypeLoadException(SR.Format(SR.CoreTypeNotFound, "System.Int64"));
System\Reflection\TypeLoading\General\Ecma\EcmaResolver.cs (1)
89return nestedType ?? throw new TypeLoadException(SR.Format(SR.Format(SR.TypeNotFound, outerType.ToString() + "[]", outerType.Assembly.FullName)));
System\Reflection\TypeLoading\Modules\Ecma\EcmaModule.GetTypeCore.cs (1)
62e = new TypeLoadException(SR.Format(SR.TypeNotFound, ns.ToUtf16().AppendTypeName(name.ToUtf16()), FullyQualifiedName));
System\Reflection\TypeLoading\Modules\RoResourceModule.cs (1)
56e = new TypeLoadException(SR.Format(SR.TypeNotFound, ns.ToUtf16().AppendTypeName(name.ToUtf16()), Assembly));
System.Resources.Extensions (3)
System\Resources\Extensions\DeserializingResourceReader.cs (2)
174throw new TypeLoadException(SR.Format(SR.TypeLoadException_CannotLoadConverter, type)); 188throw new TypeLoadException(SR.Format(SR.TypeLoadException_CannotLoadConverter, type));
System\Resources\Extensions\PreserializedResourceWriter.cs (1)
95throw new TypeLoadException(SR.Format(SR.TypeLoadException_CannotLoadConverter, primitiveType));
System.Windows.Forms (2)
System\Resources\ResXDataNode.cs (2)
390throw new TypeLoadException( 618throw new TypeLoadException(string.Format(SR.TypeLoadExceptionShort, FileRefType));
25 references to TypeLoadException
Aspire.Hosting.RemoteHost (3)
CodeGeneration\CodeGenerationDiagnostic.cs (3)
45/// <see cref="TypeLoadException.TypeName"/> when available. 168case TypeLoadException tle: 247is TypeLoadException
Aspire.Hosting.RemoteHost.Tests (8)
CodeGenerationDiagnosticBuilderTests.cs (8)
26var typeLoad = new TypeLoadException("type not found") 37Assert.Equal(typeof(TypeLoadException).FullName, diagnostic.OriginalExceptionType); 49var typeLoad = new TypeLoadException(); 56Assert.Equal(typeof(TypeLoadException).FullName, diagnostic.OriginalExceptionType); 75var inner = new TypeLoadException("nested"); 82Assert.Equal(typeof(TypeLoadException).FullName, diagnostic.OriginalExceptionType); 88var loader = new TypeLoadException("missing type"); 95Assert.Equal(typeof(TypeLoadException).FullName, diagnostic.OriginalExceptionType);
ILCompiler.ReadyToRun (1)
src\runtime\src\coreclr\tools\Common\JitInterface\CorInfoImpl.cs (1)
582catch (TypeLoadException)
Microsoft.AspNetCore.DataProtection (1)
TypeExtensions.cs (1)
38catch (TypeLoadException ex)
Microsoft.AspNetCore.Mvc.Abstractions (1)
Formatters\InputFormatterExceptionPolicy.cs (1)
17/// application configuration problems such as <see cref="TypeLoadException"/>
Microsoft.Build.Framework (1)
ExceptionHandling.cs (1)
133e is TypeLoadException // thrown when the common language runtime cannot find the assembly, the type within the assembly, or cannot load the type
mscorlib (1)
src\runtime\src\libraries\shims\mscorlib\ref\mscorlib.cs (1)
1213[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.TypeLoadException))]
netstandard (1)
netstandard.cs (1)
2214[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.TypeLoadException))]
PresentationCore (2)
MS\Internal\WindowsRuntime\Windows\UI\ViewManagement\InputPane.cs (1)
194catch (Exception e) when (e is TypeLoadException
MS\Internal\WindowsRuntime\Windows\UI\ViewManagement\UISettings.cs (1)
123catch (Exception e) when (e is TypeLoadException || e is FileNotFoundException)
System.ComponentModel.Composition (1)
System\ComponentModel\Composition\MetadataViewProvider.cs (1)
39catch (TypeLoadException ex)
System.Private.CoreLib (1)
System\Reflection\Runtime\General\Helpers.cs (1)
78public static TypeLoadException CreateTypeLoadException(string typeName, string assemblyName)
System.Resources.Extensions (1)
System\Resources\Extensions\BinaryFormat\BinaryFormattedObject.TypeResolver.cs (1)
98catch (TypeLoadException) { }
System.Runtime (1)
src\runtime\artifacts\obj\System.Runtime\Release\net11.0\System.Runtime.Forwards.cs (1)
887[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.TypeLoadException))]
System.Speech (1)
Internal\ObjectToken\ObjectToken.cs (1)
293if (e is MissingMethodException || e is TypeLoadException || e is FileLoadException || e is FileNotFoundException || e is MethodAccessException || e is MemberAccessException || e is TargetInvocationException || e is InvalidComObjectException || e is NotSupportedException || e is FormatException)
System.Text.Json (1)
System\Text\Json\Serialization\Metadata\DefaultJsonTypeInfoResolver.Helpers.cs (1)
478catch (Exception ex) when (ex is ArgumentException or TypeLoadException)