public void ManagedPdbTest() { using DataTarget dt = TestTargets.AppDomains.LoadFullDump(); PEModuleInfo clrModule = (PEModuleInfo)dt.EnumerateModules().SingleOrDefault(m => Path.GetFileNameWithoutExtension(m.FileName).Equals("clr", StringComparison.OrdinalIgnoreCase)); using PEImage img = clrModule.GetPEImage(); Assert.NotNull(img); PdbInfo imgPdb = img.DefaultPdb; Assert.NotNull(imgPdb); Assert.NotNull(imgPdb.Path); }
public void FileInfoVersionTest() { using DataTarget dt = TestTargets.AppDomains.LoadFullDump(); PEModuleInfo clrModule = (PEModuleInfo)dt.EnumerateModules().SingleOrDefault(m => Path.GetFileNameWithoutExtension(m.FileName).Equals("clr", StringComparison.OrdinalIgnoreCase)); using PEImage img = clrModule.GetPEImage(); Assert.NotNull(img); FileVersionInfo fileVersion = img.GetFileVersionInfo(); Assert.NotNull(fileVersion); Assert.NotNull(fileVersion.FileVersion); ClrInfo clrInfo = dt.ClrVersions[0]; Assert.Contains(clrInfo.Version.ToString(), fileVersion.FileVersion); }