共用方式為


.NET 運行時間載入器和系結器事件

本文所述的事件會收集與載入和卸除元件和模組相關的資訊。 如需如何針對診斷目的使用這些事件的詳細資訊,請參閱 記錄和追蹤 .NET 應用程式。

引發事件的關鍵詞 事件 水準
LoaderKeyword (0x8) DomainModuleLoad_V1 資訊 (4)
事件 事件標識碼 描述
DomainModuleLoad_V1 151 針對應用程式域載入模組時引發。

ModuleLoad_V2事件

引發事件的關鍵詞 事件 水準
LoaderKeyword (0x8) DomainModuleLoad_V1 資訊 (4)
事件 事件標識碼 描述
ModuleLoad_V2 152 在進程存留期間載入模組時引發。
功能變數名稱 數據類型 描述
ModuleID win:UInt64 模組的唯一標識碼。
AssemblyID win:UInt64 此模組所在的元件標識碼。
ModuleFlags win:UInt32 0x1:網域中性模組。

0x2:模組具有原生映射。

0x4:動態模組。

0x8:指令清單模組。
Reserved1 win:UInt32 保留欄位。
ModuleILPath win:UnicodeString 模組的通用中繼語言 (CIL) 映射路徑,如果它是動態元件,則為動態模組名稱(Null 終止)。
ModuleNativePath win:UnicodeString 如果存在,則為模組原生映射的路徑(Null 終止)。
ClrInstanceID win:UInt16 CLR 或 CoreCLR 實例的唯一標識碼。
ManagedPdbSignature win:GUID 符合此課程模組之 Managed 程式資料庫 (PDB) 的 GUID 簽章。
ManagedPdbAge win:UInt32 寫入與本課程模組相符之受控 PDB 的年齡號碼。
ManagedPdbBuildPath win:UnicodeString 建立與本課程模組相符之受控 PDB 的位置路徑。 在某些情況下,這可能只是檔名。
NativePdbSignature win:GUID 如果適用,原生映射產生器 (NGen) PDB 的 GUID 簽章符合此模組。
NativePdbAge win:UInt32 如果適用,寫入 NGen PDB 與本課程模組相符的年齡號碼。
NativePdbBuildPath win:UnicodeString 如果適用,則為符合此模組之 NGen PDB 建置位置的路徑。 在某些情況下,這可能只是檔名。

ModuleUnload_V2 事件

引發事件的關鍵詞 事件 水準
LoaderKeyword (0x8) DomainModuleLoad_V1 資訊 (4)
事件 事件標識碼 描述
ModuleUnload_V2 153 在進程存留期間卸除模組時引發。
功能變數名稱 數據類型 描述
ModuleID win:UInt64 模組的唯一標識碼。
AssemblyID win:UInt64 此模組所在的元件標識碼。
ModuleFlags win:UInt32 0x1:網域中性模組。

0x2:模組具有原生映射。

0x4:動態模組。

0x8:指令清單模組。
Reserved1 win:UInt32 保留欄位。
ModuleILPath win:UnicodeString 模組的通用中繼語言 (CIL) 映射路徑,如果它是動態元件,則為動態模組名稱(Null 終止)。
ModuleNativePath win:UnicodeString 如果存在,則為模組原生映射的路徑(Null 終止)。
ClrInstanceID win:UInt16 CLR 或 CoreCLR 實例的唯一標識碼。
ManagedPdbSignature win:GUID 符合此課程模組之 Managed 程式資料庫 (PDB) 的 GUID 簽章。
ManagedPdbAge win:UInt32 寫入與本課程模組相符之受控 PDB 的年齡號碼。
ManagedPdbBuildPath win:UnicodeString 建立與本課程模組相符之受控 PDB 的位置路徑。 在某些情況下,這可能只是檔名。
NativePdbSignature win:GUID 如果適用,原生映射產生器 (NGen) PDB 的 GUID 簽章符合此模組。
NativePdbAge win:UInt32 如果適用,寫入 NGen PDB 與本課程模組相符的年齡號碼。
NativePdbBuildPath win:UnicodeString 如果適用,則為符合此模組之 NGen PDB 建置位置的路徑。 在某些情況下,這可能只是檔名。

ModuleDCStart_V2 事件

引發事件的關鍵詞 事件 水準
LoaderKeyword (0x8) DomainModuleLoad_V1 資訊 (4)
事件 事件標識碼 描述
ModuleDCStart_V2 153 列舉開始執行期間的模組。
功能變數名稱 數據類型 描述
ModuleID win:UInt64 模組的唯一標識碼。
AssemblyID win:UInt64 此模組所在的元件標識碼。
ModuleFlags win:UInt32 0x1:網域中性模組。

0x2:模組具有原生映射。

0x4:動態模組。

0x8:指令清單模組。
Reserved1 win:UInt32 保留欄位。
ModuleILPath win:UnicodeString 模組的通用中繼語言 (CIL) 映射路徑,如果它是動態元件,則為動態模組名稱(Null 終止)。
ModuleNativePath win:UnicodeString 如果存在,則為模組原生映射的路徑(Null 終止)。
ClrInstanceID win:UInt16 CLR 或 CoreCLR 實例的唯一標識碼。
ManagedPdbSignature win:GUID 符合此課程模組之 Managed 程式資料庫 (PDB) 的 GUID 簽章。
ManagedPdbAge win:UInt32 寫入與本課程模組相符之受控 PDB 的年齡號碼。
ManagedPdbBuildPath win:UnicodeString 建立與本課程模組相符之受控 PDB 的位置路徑。 在某些情況下,這可能只是檔名。
NativePdbSignature win:GUID 如果適用,原生映射產生器 (NGen) PDB 的 GUID 簽章符合此模組。
NativePdbAge win:UInt32 如果適用,寫入 NGen PDB 與本課程模組相符的年齡號碼。
NativePdbBuildPath win:UnicodeString 如果適用,則為符合此模組之 NGen PDB 建置位置的路徑。 在某些情況下,這可能只是檔名。

ModuleDCEnd_V2 事件

引發事件的關鍵詞 事件 水準
LoaderKeyword (0x8) DomainModuleLoad_V1 資訊 (4)
事件 事件標識碼 描述
ModuleDCEnd_V2 154 在結束執行期間列舉模組。
功能變數名稱 數據類型 描述
ModuleID win:UInt64 模組的唯一標識碼。
AssemblyID win:UInt64 此模組所在的元件標識碼。
ModuleFlags win:UInt32 0x1:網域中性模組。

0x2:模組具有原生映射。

0x4:動態模組。

0x8:指令清單模組。
Reserved1 win:UInt32 保留欄位。
ModuleILPath win:UnicodeString 模組的通用中繼語言 (CIL) 映射路徑,如果它是動態元件,則為動態模組名稱(Null 終止)。
ModuleNativePath win:UnicodeString 如果存在,則為模組原生映射的路徑(Null 終止)。
ClrInstanceID win:UInt16 CLR 或 CoreCLR 實例的唯一標識碼。
ManagedPdbSignature win:GUID 符合此課程模組之 Managed 程式資料庫 (PDB) 的 GUID 簽章。
ManagedPdbAge win:UInt32 寫入與本課程模組相符之受控 PDB 的年齡號碼。
ManagedPdbBuildPath win:UnicodeString 建立與本課程模組相符之受控 PDB 的位置路徑。 在某些情況下,這可能只是檔名。
NativePdbSignature win:GUID 如果適用,原生映射產生器 (NGen) PDB 的 GUID 簽章符合此模組。
NativePdbAge win:UInt32 如果適用,寫入 NGen PDB 與本課程模組相符的年齡號碼。
NativePdbBuildPath win:UnicodeString 如果適用,則為符合此模組之 NGen PDB 建置位置的路徑。 在某些情況下,這可能只是檔名。

AssemblyLoad_V1 事件

引發事件的關鍵詞 事件 水準
LoaderKeyword (0x8) DomainModuleLoad_V1 資訊 (4)
事件 事件標識碼 描述
AssemblyLoad_V1 154 載入元件時引發。
功能變數名稱 數據類型 描述
AssemblyID win:UInt64 元件的唯一標識碼。
AppDomainID win:UInt64 這個元件的網域標識碼。
BindingID win:UInt64 可唯一識別元件系結的標識碼。
AssemblyFlags win:UInt32 0x1:網域中性元件。

0x2:動態元件。

0x4:元件具有原生映射。

0x8:可收集的元件。
AssemblyName win:UnicodeString 完整元件名稱。
ClrInstanceID win:UInt16 CoreCLR 實例的唯一標識符。

AssemblyUnload_V1事件

引發事件的關鍵詞 事件 水準
LoaderKeyword (0x8) DomainModuleLoad_V1 資訊 (4)
事件 事件標識碼 描述
FireAssemblyUnload_V1 155 載入元件時引發。
功能變數名稱 數據類型 描述
AssemblyID win:UInt64 元件的唯一標識碼。
AppDomainID win:UInt64 這個元件的網域標識碼。
BindingID win:UInt64 可唯一識別元件系結的標識碼。
AssemblyFlags win:UInt32 0x1:網域中性元件。

0x2:動態元件。

0x4:元件具有原生映射。

0x8:可收集的元件。
AssemblyName win:UnicodeString 完整元件名稱。
ClrInstanceID win:UInt16 CoreCLR 實例的唯一標識符。

AssemblyDCStart_V1 事件

引發事件的關鍵詞 事件 水準
LoaderKeyword (0x8) DomainModuleLoad_V1 資訊 (4)
事件 事件標識碼 描述
AssemblyDCStart_V1 155 列舉開始執行期間的元件。
功能變數名稱 數據類型 描述
AssemblyID win:UInt64 元件的唯一標識碼。
AppDomainID win:UInt64 這個元件的網域標識碼。
BindingID win:UInt64 可唯一識別元件系結的標識碼。
AssemblyFlags win:UInt32 0x1:網域中性元件。

0x2:動態元件。

0x4:元件具有原生映射。

0x8:可收集的元件。
AssemblyName win:UnicodeString 完整元件名稱。
ClrInstanceID win:UInt16 CoreCLR 實例的唯一標識符。

AssemblyLoadStart 事件

引發事件的關鍵詞 事件 水準
Binder (0x4) AssemblyLoadStart 資訊 (4)
事件 事件標識碼 描述
AssemblyLoadStart 290 已要求元件載入。
功能變數名稱 數據類型 描述
AssemblyName win:UnicodeString 元件名稱。
AssemblyPath win:UnicodeString 元件名稱的路徑。
RequestingAssembly win:UnicodeString 要求元件名稱(“parent”) 。
AssemblyLoadContext win:UnicodeString 載入元件的內容。
RequestingAssemblyLoadContext win:UnicodeString 載入要求元件的內容 (“parent”) 元件。
ClrInstanceID win:UInt16 CoreCLR 實例的唯一標識符。

AssemblyLoadStop 事件

引發事件的關鍵詞 事件 水準
Binder (0x4) AssemblyLoadStart 資訊 (4)
事件 事件標識碼 描述
AssemblyLoadStart 291 已要求元件載入。
功能變數名稱 數據類型 描述
AssemblyName win:UnicodeString 元件名稱。
AssemblyPath win:UnicodeString 元件名稱的路徑。
RequestingAssembly win:UnicodeString 要求元件名稱(“parent”) 。
AssemblyLoadContext win:UnicodeString 載入元件的內容。
RequestingAssemblyLoadContext win:UnicodeString 載入要求元件的內容 (“parent”) 元件。
Success win:Boolean 元件載入是否成功。
ResultAssemblyName win:UnicodeString 已載入的元件名稱。
ResultAssemblyPath win:UnicodeString 從載入的元件路徑。
Cached win:UnicodeString 是否已快取負載。
ClrInstanceID win:UInt16 CoreCLR 實例的唯一標識符。

ResolutionAttempted 事件

引發事件的關鍵詞 水準
Binder (0x4) 資訊 (4)
事件 事件標識碼 描述
ResolutionAttempted 292 已要求元件載入。
功能變數名稱 數據類型 描述
AssemblyName win:UnicodeString 元件名稱。
Stage win:UInt16 解決階段。

0:在負載中尋找。

1:元件載入內容

2:應用程式元件。

3:預設元件載入內容後援。

4:解析附屬元件。

5:元件載入內容解析。

6:AppDomain 元件解析。
AssemblyLoadContext win:UnicodeString 載入元件的內容。
Result win:UInt16 解析嘗試的結果。

0:成功

1:Assembly NotFound

2:不相容的版本

3:不相符的元件名稱

4:失敗

5:例外狀況
ResultAssemblyName win:UnicodeString 已解析的元件名稱。
ResultAssemblyPath win:UnicodeString 解析來源之元件的路徑。
ErrorMessage win:UnicodeString 如果有例外狀況,則會出現錯誤訊息。
ClrInstanceID win:UInt16 CoreCLR 實例的唯一標識符。

AssemblyLoadContextResolvingHandlerInvoked 事件

引發事件的關鍵詞 水準
Binder (0x4) 資訊 (4)
事件 事件標識碼 描述
AssemblyLoadContextResolvingHandlerInvoked 293 已叫用 AssemblyLoadContext.Resolving 處理程式。
功能變數名稱 數據類型 描述
AssemblyName win:UnicodeString 元件名稱。
HandlerName win:UnicodeString 叫用之處理程序的名稱。
AssemblyLoadContext win:UnicodeString 載入元件的內容。
ResultAssemblyName win:UnicodeString 已解析的元件名稱。
ResultAssemblyPath win:UnicodeString 解析來源之元件的路徑。
ClrInstanceID win:UInt16 CoreCLR 實例的唯一標識符。

AppDomainAssemblyResolveHandlerInvoked 事件

引發事件的關鍵詞 水準
Binder (0x4) 資訊 (4)
事件 事件標識碼 描述
AppDomainAssemblyResolveHandlerInvoked 294 已叫用 AppDomain.AssemblyResolve 處理程式。
功能變數名稱 數據類型 描述
AssemblyName win:UnicodeString 元件名稱。
HandlerName win:UnicodeString 叫用之處理程序的名稱。
ResultAssemblyName win:UnicodeString 已解析的元件名稱。
ResultAssemblyPath win:UnicodeString 解析來源之元件的路徑。
ClrInstanceID win:UInt16 CoreCLR 實例的唯一標識符。

AssemblyLoadFromResolveHandlerInvoked 事件

引發事件的關鍵詞 水準
Binder (0x4) 資訊 (4)
事件 事件標識碼 描述
AssemblyLoadFromResolveHandlerInvoked 295 已叫用 Assembly.LoadFrom 處理程式。
功能變數名稱 數據類型 描述
AssemblyName win:UnicodeString 元件名稱。
IsTrackedLoad win:Boolean 是否追蹤元件負載。
RequestingAssemblyPath win:UnicodeString 要求元件的路徑。
ComputedRequestedAssemblyPath win:UnicodeString 所要求的元件路徑。
ClrInstanceID win:UInt16 CoreCLR 實例的唯一標識符。

KnownPathProbed 事件

引發事件的關鍵詞 水準
Binder (0x4) 資訊 (4)
事件 事件標識碼 描述
KnownPathProbed 296 已針對元件探查已知的路徑。
功能變數名稱 數據類型 描述
FilePath win:UnicodeString 已探查路徑。
Source win:UInt16 已探查路徑的來源。

0x0:應用程式元件。

0x1:應用程式原生映射路徑。

0x2:應用程式路徑。

0x3:Platform 資源根目錄。

0x4:Satellite 子目錄。
Result win:UInt32 探查的 HRESULT。
ClrInstanceID win:UInt16 CoreCLR 實例的唯一標識符。