System.Diagnostics.EventLog [Answered]
For some reason it's not appearing either with name or full name, I'm using .NET6 console app
7 Replies
Did you add the NuGet package?
System.Diagnostics.EventLog
You may also need to change the target framework to net6.0-windows
.I didn't know about that, ty I will try it
yes it worked, tysm. VS didn't suggest NuGet package and couldn't find about it in MCS docs either so were a bit confused
How I figured it out was looking at it on https://docs.microsoft.com/en-us/dotnet/api/system.diagnostics.eventlog?view=dotnet-plat-ext-6.0
If it's part of the Platform Extensions, you get it via NuGet. Usually it's named the same as the "Assembly" up top.
so if its
Extension
it's always part of NuGet package?AFAIK, yes. At least you should suspect it.
got it, thank you
✅ This post has been marked as answered!