Skip to content

EventLogRecord.GetFormatDescription() throws "The specified resource type cannot be found in the image file." exception #56469

Closed

Description

Description

EventLogRecord.GetFormatDescription() throws "The specified resource type cannot be found in the image file." exception. while querying the Windows EventLog

Here is the StackTrace:

at System.Diagnostics.Eventing.Reader.EventLogException.Throw(Int32 errorCode)
at System.Diagnostics.Eventing.Reader.NativeWrapper.EvtFormatMessageRenderName(EventLogHandle pmHandle, EventLogHandle eventHandle, EvtFormatMessageFlags flag)
at System.Diagnostics.Eventing.Reader.ProviderMetadataCachedInformation.GetFormatDescription(String ProviderName, EventLogHandle eventHandle)
at HMS.Agent.LogInfoRetriever.<>c.b__1_1(EventRecord o) in C:\Users\RemoteUser\Documents\Projects\Code\HMS\HMS.Agent\LogInfoRetriever.cs:line 153
at System.Linq.Enumerable.SelectEnumerableIterator2.ToList() at HMS.Agent.LogInfoRetriever.<>c__DisplayClass1_0.<GetWindowsEventLogs>b__0() in C:\Users\RemoteUser\Documents\Projects\Code\HMS\HMS.Agent\LogInfoRetriever.cs:line 152 at System.Threading.Tasks.Task1.InnerInvoke()
at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)

Configuration

  • Which version of .NET is the code running on? -- .net 5
  • What OS and version, and what distro if applicable? -- Windows 10 build 19043.1110
  • What is the architecture (x64, x86, ARM, ARM64)? -- X64
  • Do you know whether it is specific to that configuration? -- No
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    area-System.Diagnostics.EventLoggood first issueIssue should be easy to implement, good for first-time contributorshelp wanted[up-for-grabs] Good issue for external contributors

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions